Created
June 13, 2013 04:08
-
-
Save pmichaud/5771173 to your computer and use it in GitHub Desktop.
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
pmichaud@kiwi:~/p6/rakudo$ ./perl6 | |
> my $h = Hash[Str,Int].new; | |
().hash | |
> $h{3} = 'hello'; # okay | |
hello | |
> $h{'hello'} = 'hello'; # fails key check | |
Nominal type check failed for parameter 'key'; expected Int but got Str instead | |
> $h{4} = 15; # fails value check | |
Type check failed in assignment to '$v'; expected 'Str' but got 'Int' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment