Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created April 21, 2015 21:36
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 jnthn/d8c27741c7b0d25f340d to your computer and use it in GitHub Desktop.
Save jnthn/d8c27741c7b0d25f340d to your computer and use it in GitHub Desktop.
my package EXPORTHOW {
class SUPERSEDE::class is Metamodel::ClassHOW {
method is_trusted(Mu $obj, Mu $claimant) {
$claimant.^compute_mro(); # force it to be computed for typecheck below
callsame() || $claimant.^type_check($obj.WHAT)
}
}
}
use M;
class A { method !p() { say 'yay' } }
class B is A { method x() { self!A::p } }
B.x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment