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

|$ in a signature causes a parsefail in Rakudo #2467

Closed
p6rt opened this issue Sep 11, 2011 · 9 comments
Closed

|$ in a signature causes a parsefail in Rakudo #2467

p6rt opened this issue Sep 11, 2011 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Sep 11, 2011

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

Searchable as RT98854$

@p6rt
Copy link
Author

p6rt commented Sep 11, 2011

From @masak

<JimmyZ> rakudo​: class InstanceMethod { has $.instance; has
$.methodname; method postcircumfix​:<( )>(\$c) {
$.instance."$.methodname"(|$) } }; my $m =
InstanceMethod.new(​:instance[2, 4, 6], :methodname<roll>); say $m(5)
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* JimmyZ wonders how to debug 'Contextual $*GOAL not found' :)
<masak> JimmyZ​: I think you found a bug.
<masak> rakudo​: class A { method x { self.x(|$) } }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<masak> rakudo​: sub f { f(|$) }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* masak submits rakudobug
<JimmyZ> looks like I never like right way to use rakudo :)
<jnthn> b​: sub f { f(|$) }; say "alive"
<p6eval> b 1b7dd1​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<jnthn> hm, not a regression then...
<jnthn> (Which makes sense...)

@p6rt
Copy link
Author

p6rt commented Nov 5, 2012

From @jnthn

On Sun Sep 11 07​:00​:03 2011, masak wrote​:

<JimmyZ> rakudo​: class InstanceMethod { has $.instance; has
$.methodname; method postcircumfix​:<( )>(\$c) {
$.instance."$.methodname"(|$) } }; my $m =
InstanceMethod.new(​:instance[2, 4, 6], :methodname<roll>); say $m(5)
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* JimmyZ wonders how to debug 'Contextual $*GOAL not found' :)
<masak> JimmyZ​: I think you found a bug.
<masak> rakudo​: class A { method x { self.x(|$) } }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<masak> rakudo​: sub f { f(|$) }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* masak submits rakudobug
<JimmyZ> looks like I never like right way to use rakudo :)
<jnthn> b​: sub f { f(|$) }; say "alive"
<p6eval> b 1b7dd1​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<jnthn> hm, not a regression then...
<jnthn> (Which makes sense...)

Now does the same as STD​:

sub f { f(|$) }; say "alive"
Unsupported use of $) variable; in Perl 6 please use $*EGID

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Nov 5, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 31, 2014

From @peschwa

Am Mo 05. Nov 2012, 14​:36​:15, jnthn@​jnthn.net schrieb​:

On Sun Sep 11 07​:00​:03 2011, masak wrote​:

<JimmyZ> rakudo​: class InstanceMethod { has $.instance; has
$.methodname; method postcircumfix​:<( )>(\$c) {
$.instance."$.methodname"(|$) } }; my $m =
InstanceMethod.new(​:instance[2, 4, 6], :methodname<roll>); say $m(5)
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* JimmyZ wonders how to debug 'Contextual $*GOAL not found' :)
<masak> JimmyZ​: I think you found a bug.
<masak> rakudo​: class A { method x { self.x(|$) } }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<masak> rakudo​: sub f { f(|$) }; say "alive"
<p6eval> rakudo 3c6296​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
* masak submits rakudobug
<JimmyZ> looks like I never like right way to use rakudo :)
<jnthn> b​: sub f { f(|$) }; say "alive"
<p6eval> b 1b7dd1​: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
<jnthn> hm, not a regression then...
<jnthn> (Which makes sense...)

Now does the same as STD​:

sub f { f(|$) }; say "alive"
Unsupported use of $) variable; in Perl 6 please use $*EGID

Tagging testneeded.

/jnthn

Added test to roast in commit a78a516 as per the example above.

@p6rt
Copy link
Author

p6rt commented Feb 20, 2014

From @coke

test added by peschwa++, closing ticket
--
Will "Coke" Coleda

1 similar comment
@p6rt
Copy link
Author

p6rt commented Feb 20, 2014

From @coke

test added by peschwa++, closing ticket
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 20, 2014

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

@p6rt p6rt closed this as completed Feb 20, 2014
@p6rt
Copy link
Author

p6rt commented Jul 1, 2015

From @usev6

It looks like this was not a bug regarding '|$' in a signature, but a mis-parse. AFAIU commits rakudo/rakudo@ce263122bc and perl6/std@53b3ca6ff2 changed the parsing rules for rakudo and STD, respectively. The error messages are gone now​:

< bartolin> std​: sub f { f(|$) }
<+camelia> std 28329a7​: OUTPUT«ok 00​:00 138m␤»
< bartolin> m​: sub f { f(|$) }
<+camelia> rakudo-moar 5bfaaf​: ( no output )

I changed the test accordingly and moved it to S02-names/bare-sigil.t (commit Raku/roast@b251b6fc0f).

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jul 1, 2015

From @usev6

It looks like this was not a bug regarding '|$' in a signature, but a mis-parse. AFAIU commits rakudo/rakudo@ce263122bc and perl6/std@53b3ca6ff2 changed the parsing rules for rakudo and STD, respectively. The error messages are gone now​:

< bartolin> std​: sub f { f(|$) }
<+camelia> std 28329a7​: OUTPUT«ok 00​:00 138m␤»
< bartolin> m​: sub f { f(|$) }
<+camelia> rakudo-moar 5bfaaf​: ( no output )

I changed the test accordingly and moved it to S02-names/bare-sigil.t (commit Raku/roast@b251b6fc0f).

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