Hi,
So before, this would not work out because it found the wrong outer:
--
.sub main
outer()
.end
.namespace [ 'Foo' ]
.sub outer
say "oops"
.end
.namespace []
.sub outer
$P0 = new 'Integer'
$P0 = 42
.lex '$a', $P0
test()
.end
.sub test :outer('outer')
$P0 = find_lex '$a'
say $P0
.end
--
Now with :lexid, we can mark the subs and use it to refer to them in
outer (note that :lexid defaults to the sub name, so this change is
backward compatible):
--
.sub main
outer()
.end
.namespace [ 'Foo' ]
.sub outer :lexid('foo')
say "oops"
.end
.namespace []
.sub outer :lexid('bar')
$P0 = new 'Integer'
$P0 = 42
.lex '$a', $P0
test()
.end
.sub test :outer('bar')
$P0 = find_lex '$a'
say $P0
.end
--
This gives 42, which is The Answer, so all must be good. (Apart from my
sanity, after hacking on IMCC...)
No new failing tests in Parrot nor Rakudo spectest_regression. In as r28710.
Hope this is what's needed,
Jonathan