Skip to content

Instantly share code, notes, and snippets.

@agentzh
Created January 22, 2017 23:09
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 agentzh/1e61c6267c1961fce7f05d436865977d to your computer and use it in GitHub Desktop.
Save agentzh/1e61c6267c1961fce7f05d436865977d to your computer and use it in GitHub Desktop.
use Foo::Node;
unit class Main is Foo::Node;
use Foo::Stmt;
use Foo::Use;
has Array[Foo::Stmt] %.foo{Str};
method bar {
my Foo::Stmt @a;
my @cur-sub-docs = [@a];
%!foo<abc> = @a; # this line throws out a type constraint failure exception
}
unit class Foo::Node;
use Foo::Node;
unit class Foo::Stmt is Foo::Node;
use Foo::Stmt;
unit class Foo::Use is Foo::Stmt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment