Skip to content

Instantly share code, notes, and snippets.

@CurtTilmes
Last active December 16, 2017 20:01
Show Gist options
  • Save CurtTilmes/7f1d39f7c4df0c3c2458292fe57aae60 to your computer and use it in GitHub Desktop.
Save CurtTilmes/7f1d39f7c4df0c3c2458292fe57aae60 to your computer and use it in GitHub Desktop.
Error demonstration
~/testing$ perl6 -v
This is Rakudo Star version 2017.10 built on MoarVM version 2017.10
implementing Perl 6.c.
~/testing$ perl6 -I . testit.p6
Type check failed in assignment to $!list; expected Array[Str] but got Array[Str].new("this")
in submethod BUILDALL at /home/ctilmes/testing/Testmod.pm6 (Testmod) line 1
in block <unit> at testit.p6 line 4
use Testit;
use Testmod;
MyTestClass.new(list => Array[Str].new('this'));
class AnotherTestClass
{
has Str @.something;
}
class MyTestClass
{
has Array[Str] $.list;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment