Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created April 17, 2019 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/6c00c758d775b4a0b484ad4b6ed16c57 to your computer and use it in GitHub Desktop.
Save Whateverable/6c00c758d775b4a0b484ad4b6ed16c57 to your computer and use it in GitHub Desktop.
evalable6
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;
(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