1 Check the lexical scoping of the switch keywords.
2 (The actual behaviour is tested in t/op/smartmatch.t)
5 # No ~~; should be a syntax error.
9 syntax error at - line 3, near "2 ~"
10 Execution of - aborted due to compilation errors.
12 # With ~~, should work
19 # ~~ out of scope; should be a syntax error.
24 syntax error at - line 4, near "2 ~"
25 Execution of - aborted due to compilation errors.
27 # 'no feature' should work
30 print +(2 ~~ 2), "\n";
32 print +(2 ~~ 2), "\n";
34 syntax error at - line 6, near "2 ~"
35 Execution of - aborted due to compilation errors.
37 # 'no feature "~~"' should work too
40 print +(2 ~~ 2), "\n";
42 print +(2 ~~ 2), "\n";
44 syntax error at - line 6, near "2 ~"
45 Execution of - aborted due to compilation errors.