-
Notifications
You must be signed in to change notification settings - Fork 1
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
Composing an inherited class through a parametric role doesn't work in Rakudo #2679
Comments
From @masak<moritz> nom: role A[::T $] { also is T }; class B { }; class C does |
From @smlsOn Wed, 21 Mar 2012 08:32:55 -0700, masak wrote:
Now it throws earlier, and with a nicer error message: ===SORRY!=== Error while compiling -e Not sure if it can be made to work like you wanted. Not sure if it can be made to actually work (i.e. defer the `also is T` until class composition time, at which point the concrete type of T would be available). Seems related to: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=130634 |
The RT System itself - Status changed from 'new' to 'open' |
It looks like this works now as expected:
Tagging "testneeded". |
I'm actually a little bit shocked that this works. My mental model needs to do some stretching exercises before attempting to cover a semantics where this Just Works. I'm now very curious, and might dip into the implementation just to see what's going on. (Note message from smls in 2017, "Not sure if it can be made to work like you wanted.") Is it the case that the role body contains a... "script" (with possibly-late-bound things like |
For the record -- and maybe helpful if you want to look at the implementation: According to |
That is indeed helpful. Thank you! I can't say I follow the diff perfectly, but the commit message indeed settles whether this was a deliberate move or not. |
Migrated from rt.perl.org#111912 (status was 'open')
Searchable as RT111912$
The text was updated successfully, but these errors were encountered: