Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created May 18, 2012 16:55
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 gfldex/2726387 to your computer and use it in GitHub Desktop.
Save gfldex/2726387 to your computer and use it in GitHub Desktop.
enum E (Jan => 1, Feb => 2);
class A {
class B {
has $.i is rw;
}
}
our method ACCEPTS(E:D $self: A::B:D $topic){
say "I'm not called";
return $topic.i == $self;
}
my $b = A::B.new;
$b.i = 1;
say $b ~~ E;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment