I was gonna edit this into my other related question, but it feels different enough and I don't want to ask too many questions per question.
My mind... has exploded.
Consider:
use strict;
my Int $n = 6;
my Str $x = "a";
my @l = $n, $x;
say @l ~~ List;
Prints True
, as expected.
Consider, then:
use strict;
my Int $n = 6;
my Str $x = "a";
my List @l = $n, $x; # <-- only change is the type notation
say @l ~~ List;
Which dies with:
Type check failed in assignment to @l; expected List but got Int
So... the type of List is List but I can't say it's List because that's a sin!
What's going on here? Is this a bug? Or am I bringing my irrelevant Python and Go idioms to Perl and breaking things?