Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s[] is not recognized as illegal substitution with null pattern, but as a subroutine call #2355

Closed
p6rt opened this issue Feb 7, 2011 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Feb 7, 2011

Migrated from rt.perl.org#83552 (status was 'resolved')

Searchable as RT83552$

@p6rt
Copy link
Author

p6rt commented Feb 7, 2011

From @moritz

08​:49 < moritz_> rakudo​: $_ = "foo"; s[] = 'bar'; .say
08​:50 <+p6eval> rakudo 989883​: OUTPUT«Could not find sub &s␤ in main
program body at line 22​:/tmp/b7_gMKxUFS␤»
08​:51 < moritz_> rakudo​: $_ = "foo"; s[f] = 'bar'; .say
08​:51 <+p6eval> rakudo 989883​: OUTPUT«baroo␤»
08​:51 < moritz_> so it doesn't commit to the [
08​:54 < TimToady> std​: $_ = "foo"; s[] = 'bar'; .say
08​:54 <+p6eval> std 625303c​: OUTPUT«===SORRY!===␤Null pattern not
allowed at /tmp/zVvv5rwrey line 1​:␤------> $_ = "foo"; s[⏏] = 'bar';
.say␤Parse failed␤FAILED 00​:01 121m␤»
08​:54 < TimToady> std​: $_ = "foo"; s[f] = 'bar'; .say
08​:54 <+p6eval> std 625303c​: OUTPUT«ok 00​:01 123m␤»
08​:54 < TimToady> rakudo should not backtrack there
09​:51 * moritz_ submits rakudobug, justin case

@p6rt
Copy link
Author

p6rt commented Nov 20, 2012

From @FROGGS

the behaviour has changed but the messsage is LTA​:

<FROGGS> rakudo​: $_ = "foo"; s[] = 'bar'; .say
<p6eval> rakudo bf472b​: OUTPUT«===SORRY!===␤Unrecognized regex
metacharacter ] (must be quoted to match literally) at line 2, near " =
'bar'; "␤»

@p6rt
Copy link
Author

p6rt commented Nov 20, 2012

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 7, 2013

From @FROGGS

<FROGGS> rakudo​: $_ = "foo"; s[] = 'bar'; .say
<p6eval> rakudo 4fb07b​: OUTPUT«===SORRY!===␤Null regex not allowed␤at
/tmp/W3qa158pjS​:1␤------> $_ = "foo"; s[⏏] = 'bar'; .say␤ expecting
any of​:␤ postfix␤ infix or meta-infix␤ infix
stopper␤ statement end␤ statement modi…
<FROGGS> rakudo​: $_ = "foo"; s[f] = 'bar'; .say
<p6eval> rakudo 4fb07b​: OUTPUT«baroo␤»

I believe this commit fixed it​:
rakudo/rakudo@d77b765#L1L1623

@p6rt
Copy link
Author

p6rt commented Mar 14, 2013

From @timo

committed a test for this in roast​: 4bd5589

@p6rt
Copy link
Author

p6rt commented Mar 14, 2013

@timo - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 14, 2013
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant