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 25d53a04a9..13fcc1e5b1 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -662,6 +662,7 @@ open FOO || time;
open FOO || time;
}
open FOO || time;
+open Foo::BAR; # this should not warn
EXPECT
Precedence problem: open FOO should be open(FOO) at - line 3.
Precedence problem: open FOO should be open(FOO) at - line 8.
diff --git a/toke.c b/toke.c
index c6e0097fd7..db743e903d 100644
--- a/toke.c
+++ b/toke.c
@@ -7681,6 +7681,7 @@ Perl_yylex(pTHX)
if ( *t && strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE)
/* [perl #16184] */
&& !(t[0] == '=' && t[1] == '>')
+ && !(t[0] == ':' && t[1] == ':')
&& !keyword(s, d-s, 0)
) {
int parms_len = (int)(d-s);