summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-27 23:11:59 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-12-27 23:11:59 +0000
commit264e1af351acde2005eb4df085136043665b2b9c (patch)
tree057a1d2d0bcf505753267b65cd654e5adedac3fc /perly.y
parente4568ebb449242658dc89dca2cbff0f024acf76c (diff)
downloadperl-264e1af351acde2005eb4df085136043665b2b9c.tar.gz
Fix bug [perl #24762] : C<*foo{CODE} ? 1 : 0> was a syntax error
p4raw-id: //depot/perl@21986
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/perly.y b/perly.y
index 7d39242160..63210aec2e 100644
--- a/perly.y
+++ b/perly.y
@@ -477,7 +477,8 @@ method : METHOD
subscripted: star '{' expr ';' '}' /* *main::{something} */
/* In this and all the hash accessors, ';' is
* provided by the tokeniser */
- { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); }
+ { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3));
+ PL_expect = XOPERATOR; }
| scalar '[' expr ']' /* $array[$element] */
{ $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); }
| term ARROW '[' expr ']' /* somearef->[$element] */