summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-12-13 17:48:34 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-12-13 18:06:59 -0800
commit4748e0020f8a6874cca537d6f4191150c046410c (patch)
tree68e501e87d11398eb5e0eb8a6901175f6b28ad54 /t
parent92bd82a0bbf6e4ba85031c2761f405bdddc08c82 (diff)
downloadperl-4748e0020f8a6874cca537d6f4191150c046410c.tar.gz
Fix ‘Can't declare null operation in "my"’
This message is very unhelpful. This was brought up in ticket #115688.
Diffstat (limited to 't')
-rw-r--r--t/lib/croak/op12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/lib/croak/op b/t/lib/croak/op
index 4cc82af2f9..603f718350 100644
--- a/t/lib/croak/op
+++ b/t/lib/croak/op
@@ -50,6 +50,18 @@ my main $f;
EXPECT
No such class field "c" in variable $f of type main at - line 3.
########
+# NAME Can't declare conditional
+my($a?$b:$c)
+EXPECT
+Can't declare conditional expression in "my" at - line 1, at EOF
+Execution of - aborted due to compilation errors.
+########
+# NAME Can't declare do block
+my(do{})
+EXPECT
+Can't declare do block in "my" at - line 1, at EOF
+Execution of - aborted due to compilation errors.
+########
# NAME delete BAD
delete $x;
EXPECT