Created
February 14, 2020 21:57
-
-
Save Altreus/528c6172a673c0adef7dd7a3ace22b19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To exit type 'exit' or '^D' | |
> role X { multi method moo (X:U:) { self.new.moo }; multi method moo (X:D:) { ... } } | |
(X) | |
> class A does X {} | |
===SORRY!=== Error while compiling: | |
Multi method 'moo' with signature :(X:D: *%_) must be implemented by A because it is required by a role | |
> role Y { multi method bar (::?CLASS:U:) { self.new.bar }; multi method bar (::?CLASS:D:) { ... } } | |
(Y) | |
> class B does Y {} | |
===SORRY!=== Error while compiling: | |
Multi method 'bar' with signature :(B:D: *%_) must be implemented by B because it is required by a role | |
> role Z { multi method bar (::?CLASS:U:) returns ::?CLASS { self.new.bar }; multi method bar (::?CLASS:D:) returns ::?CLASS { ... } } | |
(Z) | |
> class C does Z {} | |
===SORRY!=== Error while compiling: | |
No such method 'raku' for invocant of type '::?CLASS' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment