New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stubbing a parent class breaks instantiating its child from within the parent definition #3423
Comments
From @masak<masak> r: class A { ... }; class B is A {}; class A {}; say B.new; say "alive" Found by diakopter++. |
From @masak<moritz> I don't think you should be able to inherit from a class that's |
@masak - Status changed from 'new' to 'open' |
From pjablons@conncoll.edu23:29 psch m: class A::B {...}; class A::C is A::B { method WHICH { say "which" } }; class A::B { method inst { return A::C.new } }; my $a = A::B.inst; $a.WHICH |
From @moritzOn 03.07.2014 13:04, Peter (via RT) wrote:
I don't see how that could ever be made to work. At the time that the This means at the very least that if you inherit from a stubbed class, So the best thing we can do is throw a better error message, at class Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @usev6Rakudo now dies with a typed exception X::Inheritance::NotComposed when trying to inherit from a stubbed class -- cmp. ticket 81060 (https://rt-archive.perl.org/perl6/Ticket/Display.html?id=81060). I don't merge both tickets since that would make things rather confusing IMHO. On the basis of Moritz's comment and the implemented typed exception, I'm rejecting this ticket. If you don't agree, please reopen. |
@usev6 - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#122221 (status was 'rejected')
Searchable as RT122221$
The text was updated successfully, but these errors were encountered: