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
$ 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.
$ 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.
Migrated from rt.perl.org#63170 (status was 'resolved')
Searchable as RT63170$
The text was updated successfully, but these errors were encountered: