From 9c2603366a504b26c747cb747e1e35da9ed6d086 Mon Sep 17 00:00:00 2001 From: Dan Collins Date: Mon, 4 Jul 2016 19:33:29 -0400 Subject: [PATCH] t/lib/warnings/op: tests for RT #6870 --- t/lib/warnings/op | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- 1.8.3.1