masak (>): > $ cat A.pm > use v6; > use B; > > class A does C { > } > $ cat B.pm > use v6; > use C; > $ cat C.pm > use v6; > > role C { > } > $ perl6 A.pm # works > > I've encountered cases where this fails during PIR compilation, but I > am unable to reproduce them right now. AFAIU, it should fail always.
This bug is, as jnthn++ pointed out over IRC, largely bogus. An indirectly declared C should be visible in A, so the above code should never fail, not always as I claimed. The failure during PIR compilation turned out to be due to an undeclared identifier 'B'. $ cat A.pm use v6; class A { has B $!b; } $ cat A/B.pm use v6; use A; class A::B is A { } $ perl6 --target=pir --output=A.pir A.pm $ perl6 --target=pir --output=A/B.pir A/B.pm Lexical 'self' not found [...] But that makes this bug a variant of #67268. Marking it as such.