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
I believe the first eval needs to throw just like the second does:
<Zoffix__> m: BEGIN '/tmp/dyncall'.IO.mkdir.add('DYN.pm6').spurt: 「sub EXPORT { Map.new: ('$meows' => 'foos', '&foo' => sub { CALLER::<$meows> }) }」; use lib </tmp/dyncall>; use DYN; say foo
<camelia> rakudo-moar 6a6470f9d: OUTPUT: «foos»
<Zoffix__> m: BEGIN '/tmp/dyncall'.IO.mkdir.add('DYN.pm6').spurt: 「sub EXPORT { {'$meows' => 'foos', '&foo' => sub { CALLER::<$meows> }} }」; use lib </tmp/dyncall>; use DYN; say foo
<camelia> rakudo-moar 6a6470f9d: OUTPUT: «Cannot access '$meows' through CALLER, because it is not declared as dynamic in sub at /tmp/dyncall/DYN.pm6 (DYN) line 1 in block <unit> at <tmp> line 1»
The text was updated successfully, but these errors were encountered:
I think the problem here is that dynamic is presently a property on a Scalar (or Array or Hash). When CALLER lookups encounter something that does not have a dynamic method, it just resolves the result. We can't just make that case throw, alas, because we'd break every case like my $*FOO := 42 - that is, where binding was used.
I believe the first eval needs to throw just like the second does:
The text was updated successfully, but these errors were encountered: