You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ perl6 bin/007 -e="if [1, 2, 3] -> a { say(a) }"
Variable 'a' is not declared
in method find at /home/masak/mine/007/lib/_007/Runtime.pm:74
in method get-var at /home/masak/mine/007/lib/_007/Runtime.pm:83
in method eval at /home/masak/mine/007/lib/_007/Q.pm:69
in method dispatch:<hyper> at src/gen/m-CORE.setting:1351
in method eval at /home/masak/mine/007/lib/_007/Q.pm:196
in method run at /home/masak/mine/007/lib/_007/Q.pm:243
in method run at /home/masak/mine/007/lib/_007/Q.pm:438
in method run at /home/masak/mine/007/lib/_007/Q.pm:261
in method run at /home/masak/mine/007/lib/_007/Q.pm:438
in method run at /home/masak/mine/007/lib/_007/Runtime.pm:28
in sub run_007 at bin/007:8
in sub MAIN at bin/007:15
in sub MAIN at bin/007:11
in block <unit> at bin/007:15
Closable with a fix and a regression test.
The text was updated successfully, but these errors were encountered:
I was sure we had a test for this. And we do, in corner-cases.t.
{
my $program = q:to/./;
if "James" -> s {
say(s);
}
.
my $ast = q:to/./;
(statements
(if (str "James") (block (parameters (ident "s")) (statements
(stexpr (call (ident "say") (arguments (ident "s"))))))))
.
parses-to $program, $ast, "if statement with a pointy block";
}
But the test only makes sure we compile to the right AST. Something must be going wrong after that. Perhaps in the way Q::Statement::If handles its parameter declaration?
Closable with a fix and a regression test.
The text was updated successfully, but these errors were encountered: