11:13 librasteve_ left
patrickb m: (1,2,3).map(*.&a); sub a($t) { } 16:10
camelia ( no output )
patrickb How camelia the above with RakuAST?
*How can I 16:11
m: Q|(1,2,3).map(*.&a); sub a($t) { }|.AST.EVAL 16:13
camelia ===SORRY!=== Error while compiling EVAL_0
Undeclared routine:
a used at line 1
patrickb ^ That's the zef on RakuAST error I've been seeing. 16:14
Note that sub a is put after the call, not before. 16:15
lizmat I guess the lookup for &a is too eager 16:16
and that's a bug in RakuAST I'd say
patrickb same breakage when using $_.& syntax 16:17
Works when using a($_) syntax 16:18
lizmat I guess the &a in RakuAST always directly translates into a lookup and when that fails, errors out 16:19
I guess in the legacy grammar it just assumes it will be looked up later
ab5tract I think it might be that the routine is not installed into the EVAL'd scope, and we are much more graceful about what we put in there, so that an imported sub is visible to EVAL's with the base compiler 17:36
but it is not currently visible during an EVAL in RakuAST 17:37
lizmat % RAKUDO_RAKUAST=1 raku -e '(1,2,3).map(*.&a); sub a($t) { }' 23:34
===SORRY!=== Error while compiling -e
Undeclared routine:
a used at line 1
so it's more general?
ab5tract ^^