On Thu Jan 29 21:08:33 2009, s1n wrote:
> On Sun Dec 14 02:12:09 2008, masak wrote:
> > Rakudo r33860 can handle extending classes with new methods just fine...
> > 
> > $ perl6 -e 'class A {}; class A is also { method foo() { say "OH HAI"
> > } }' # works
> > 
> > ...but not when the class wasn't first defined.
> > 
> > $ perl6 -e 'class A is also { method foo() { say "OH HAI" } }' #
mwhahaha
> > Null PMC access in find_method()
> > [...]
> > 
> > Maybe the above _should_ be an error (though I don't immediately see a
> > reason), but I don't think it should be a Null PMC access.
> 
> As of r36167, this will no longer crash as described, nut a different
> crash will occur if A is used:
> 
> $ ./ -e 'class A is also { method foo() { say "OH HAI" } }; my $t =
> A.new; $t.foo();'
> Null PMC access in getprop()
> [...]
> 
This now fails at compile time with:

Cannot use 'is also' on non-existent class A

As of git b2e7ac9. Plus added test to help make sure even the
declaration against a non-existent type fails.

Thanks,

Jonathan

Reply via email to