diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-12-13 17:48:34 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-12-13 18:06:59 -0800 |
commit | 4748e0020f8a6874cca537d6f4191150c046410c (patch) | |
tree | 68e501e87d11398eb5e0eb8a6901175f6b28ad54 /t | |
parent | 92bd82a0bbf6e4ba85031c2761f405bdddc08c82 (diff) | |
download | perl-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/op | 12 |
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 |