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

capturing to lexical variable buggy #4222

Open
p6rt opened this issue May 6, 2015 · 1 comment
Open

capturing to lexical variable buggy #4222

p6rt opened this issue May 6, 2015 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented May 6, 2015

Migrated from rt.perl.org#125122 (status was 'new')

Searchable as RT125122$

@p6rt
Copy link
Author

p6rt commented May 6, 2015

From @FROGGS

Here it explodes​:

my $foo; "abcd" ~~ m/a $foo=(..) d/
rakudo-moar 343474​: OUTPUT«===SORRY!===␤QAST​::Block with cuid cuid_1_1430941905.97113 has not appeared␤»

Here it makes the match fail​:
my $foo; say "abcd" ~~ m/a $foo=[..] d/
rakudo-moar 343474​: OUTPUT«False␤»

My guess is that it interpolates the variable instead of treating it as an alias to the capture.

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant