From: Dan Collins Date: Mon, 4 Jul 2016 23:33:29 +0000 (-0400) Subject: t/lib/warnings/op: tests for RT #6870 X-Git-Tag: v5.25.7~262 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/9c2603366a504b26c747cb747e1e35da9ed6d086?hp=5072d9dd38a0e9f440451f559acc39dc61d78604 t/lib/warnings/op: tests for RT #6870 --- diff --git a/t/lib/warnings/op b/t/lib/warnings/op index cc0cf46..aba9c58 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -2083,3 +2083,19 @@ my $x2 = !A || !B; # warning-free, because upper-case won't clash EXPECT Unquoted string "a" may clash with future reserved word at - line 2. Unquoted string "b" may clash with future reserved word at - line 2. +######## +# RT #6870: Odd parsing of do...for... +# This was really more a tokenizer bug, but it manifests as spurious warnings +use warnings; +no warnings 'reserved'; +$a=do xa for ax; +do "xa" for ax; +do xa for ax; +do xa for "ax"; +do xa for sin(1); +do xa for (sin(1)); +do xa for "sin"; +do xa for qq(sin); +do xa for my $a; +do xa for my @a; +EXPECT