Last active
December 16, 2017 20:01
-
-
Save CurtTilmes/7f1d39f7c4df0c3c2458292fe57aae60 to your computer and use it in GitHub Desktop.
Error demonstration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Testit; | |
use Testmod; | |
MyTestClass.new(list => Array[Str].new('this')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AnotherTestClass | |
{ | |
has Str @.something; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyTestClass | |
{ | |
has Array[Str] $.list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment