On Wed, 21 Mar 2012 08:32:55 -0700, masak wrote:
> <moritz> nom: role A[::T $] { also is T }; class B { }; class C does
> A[B] { }; say C ~~ B
> <p6eval> rakudo 1a468d: OUTPUT«===SORRY!===␤Cannot type check against
> type variable T␤»

Now it throws earlier, and with a nicer error message:

    ===SORRY!=== Error while compiling -e
    T does not support inheritance, so A cannot inherit from it

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.perl.org/Ticket/Display.html?id=130634

Reply via email to