perl6/doc/lib/X/Inheritance/Unsupported

doc src
(title) class X::Inheritance::Unsupported
    class X::Inheritance::Unsupported does X::Comp { }

 
Compile time error thrown when trying to inherit from a type that does not support inheritance (like a package or an enum). For example
    enum A <Ax Ay>;
    class B is A { };

 
dies with
    ===SORRY!===
    A does not support inheritance, so B cannot inherit from it

 

Methods

(head2) child-typename
The name of the type that tries to inherit.
(head2) parent
The type object that the child tried to inherit from.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: