summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/lib/warnings/toke1
-rw-r--r--toke.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index 95612eb25f..25d53a04a9 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -644,6 +644,7 @@ Ambiguous use of -fred resolved as -&fred() at - line 11.
########
# toke.c
open FOO || time;
+open local *FOO; # should be ok
EXPECT
Precedence problem: open FOO should be open(FOO) at - line 2.
########
diff --git a/toke.c b/toke.c
index e5da941510..2c29c582e2 100644
--- a/toke.c
+++ b/toke.c
@@ -7672,6 +7672,7 @@ Perl_yylex(pTHX)
if ( *t && strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE)
/* [perl #16184] */
&& !(t[0] == '=' && t[1] == '>')
+ && !keyword(s, d-s, 0)
) {
int parms_len = (int)(d-s);
Perl_warner(aTHX_ packWARN(WARN_PRECEDENCE),