Created
April 17, 2019 17:56
-
-
Save Whateverable/6c00c758d775b4a0b484ad4b6ed16c57 to your computer and use it in GitHub Desktop.
evalable6
This file contains 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
class A { submethod TWEAK(|) { "A.TWEAK".say; }; }; class B is A { submethod TWEAK(|) { "B.TWEAK".say; } }; say A.^can("TWEAK")[0].wrap(-> (|) { self.^name; }); B.new; |
This file contains 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
(exit code 1) | |
===SORRY!=== Error while compiling /tmp/ay830bJfR1 | |
'self' used where no object is available | |
at /tmp/ay830bJfR1:1 | |
------> }; say A.^can("TWEAK")[0].wrap(-> (|) {⏏ self.^name; }); B.new; | |
expecting any of: | |
term |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment