On Thu Feb 12 01:22:34 2009, masak wrote:
> In Rakudo b2e7ac, Parrot r36619:
> 
> $ cat A.pm
> use v6;
> role A { method x(B $b) {} }
> $ perl6 -e 'role B {}; use A; A.x(B)'
> Null PMC access in isa()
> [...]
> 
> Observations:
> 
> * The role A must be imported for this to happen.
> * The parameter in method x must refer to B.
> * The argument to A.x doesn't actually have to be B, or of type B. The
> error occurs anyway.

Note that this should never "work" because of separate compilation. If
you pre-compiled A.pm it would fail telling you that you had a malformed
declaration (because type B did not exist). We just didn't give the
compiler a clean enough set of state so it thought B was acceptable, and
generated something that barfed at runtime instead.

Anyway, in git 703b36e I've now made sure we give a clean @?BLOCK to the
recursive call into the compiler in a use, which means we fail at
compile time now, as we should.

Thanks,

Jonathan

Reply via email to