}
BEGIN { require "./test.pl"; }
-plan( tests => 108 );
+plan( tests => 110 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
check(qr/^Great hail!.*no more\.$/, 61, "Overflow both small buffer checks");
EOSTANZA
+{
+ my @x = 'string';
+ is(eval q{ "$x[0]->strung" }, 'string->strung',
+ 'literal -> after an array subscript within ""');
+ @x = ['string'];
+ # this used to give "string"
+ like("$x[0]-> [0]", qr/^ARRAY\([^)]*\)-> \[0]\z/,
+ 'literal -> [0] after an array subscript within ""');
+}
+
__END__
# Don't add new tests HERE. See note above
--PL_lex_brackets;
if (PL_lex_state == LEX_INTERPNORMAL) {
if (PL_lex_brackets == 0) {
- if (*s != '[' && *s != '{' && (*s != '-' || s[1] != '>'))
+ if (*s == '-' && s[1] == '>')
+ PL_lex_state = LEX_INTERPENDMAYBE;
+ else if (*s != '[' && *s != '{')
PL_lex_state = LEX_INTERPEND;
}
}