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

Quote braid misses Main braid's language change due to new ops #6593

Closed
p6rt opened this issue Oct 10, 2017 · 6 comments
Closed

Quote braid misses Main braid's language change due to new ops #6593

p6rt opened this issue Oct 10, 2017 · 6 comments
Labels
regression Issue did not exist previously

Comments

@p6rt
Copy link

p6rt commented Oct 10, 2017

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

Searchable as RT132262$

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

From @zoffixznet

If you enter the Quote braid, then define a new op, and then try to use it in a block within quotes, it fails to find the routine​:

18​:29 m​: ""; sub postfix​:<!>($) {}; "{ 5! }";
18​:29 camelia rakudo-moar e13512​: OUTPUT​: «5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>​:1␤------> 3""; sub postfix​:<!>($) {}; "{ 5!7⏏5 }";␤ expecting any of​:␤ infix␤ infix stopper␤»

But if you move the first quotes past the sub, then it works​:

18​:29 Zoffix m​: sub postfix​:<!>($) {}; ""; "{ 5! }";
18​:29 camelia rakudo-moar e13512​: OUTPUT​: «WARNINGS for <tmp>​:␤Useless use of constant string "" in sink context (line 1)␤Use of Nil in string context␤ in block <unit> at <tmp> line 1␤»

IRC​: https://irclog.perlgeek.de/perl6/2017-10-10#i_15284813

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

From @AlexDaniel

This is actually a regression.

Code​:
$ = ""; sub postfix​:<♥> { $^a + 42}; say "{ 5♥ }"

¦«2015.12»​:
47

¦«2016.06»​:
47

¦«2016.12»​:
47

¦«2017.06»​:
===SORRY!=== Error while compiling /home/bisectable/git/whateverable/data/regressionable/15285677/snippet
Bogus postfix
at /home/bisectable/git/whateverable/data/regressionable/15285677/snippet​:1
------> "; sub postfix​:<♥> { $^a + 42}; say "{ 5⏏♥ }"
    expecting any of​:
        infix
        infix stopper
        statement end
        statement modifier
        statement modifier loop «exit code = 1»

¦«HEAD»​:
===SORRY!=== Error while compiling /home/bisectable/git/whateverable/data/regressionable/15285677/snippet
Bogus postfix
at /home/bisectable/git/whateverable/data/regressionable/15285677/snippet​:1
------> "; sub postfix​:<♥> { $^a + 42}; say "{ 5⏏♥ }"
    expecting any of​:
        infix
        infix stopper
        statement end
        statement modifier
        statement modifier loop «exit code = 1»

Possible IRC discussion​: https://irclog.perlgeek.de/perl6-dev/2017-10-10#i_15285677

Bisectable points at 25 possible candidates​: https://gist.github.com/Whateverable/1510af516a727e3d09d1e19b39123f0e

There's some stuff about braids in these commits so maybe some inspiration can be taken from there.

On 2017-10-10 11​:30​:50, cpan@​zoffix.com wrote​:

If you enter the Quote braid, then define a new op, and then try to
use it in a block within quotes, it fails to find the routine​:

18​:29 m​: ""; sub postfix​:<!>($) {}; "{ 5! }";
18​:29 camelia rakudo-moar e13512​: OUTPUT​: «5===SORRY!5===
Error while compiling <tmp>␤Negation metaoperator not followed by
valid infix␤at <tmp>​:1␤------> 3""; sub postfix​:<!>($) {}; "{ 5!7⏏5
}";␤ expecting any of​:␤ infix␤ infix stopper␤»

But if you move the first quotes past the sub, then it works​:

18​:29 Zoffix m​: sub postfix​:<!>($) {}; ""; "{ 5! }";
18​:29 camelia rakudo-moar e13512​: OUTPUT​: «WARNINGS for
<tmp>​:␤Useless use of constant string "" in sink context (line 1)␤Use
of Nil in string context␤ in block <unit> at <tmp> line 1␤»

IRC​: https://irclog.perlgeek.de/perl6/2017-10-10#i_15284813

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

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

@p6rt
Copy link
Author

p6rt commented Oct 16, 2017

From @zoffixznet

Yeah, it's the quote lang cache that's giving trouble. I know where the bug is at just need to find the right swatter... Gonna do it next weekend.

@p6rt
Copy link
Author

p6rt commented Oct 28, 2017

From @zoffixznet

On Mon, 16 Oct 2017 15​:58​:01 -0700, cpan@​zoffix.com wrote​:

Yeah, it's the quote lang cache that's giving trouble. I know where
the bug is at just need to find the right swatter... Gonna do it next
weekend.

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@ad16c6fb8635e08
Test​: Raku/roast@730b5c8239a8bb926

@p6rt
Copy link
Author

p6rt commented Oct 28, 2017

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

@p6rt p6rt closed this as completed Oct 28, 2017
@p6rt p6rt added the regression Issue did not exist previously label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant