Skip to content
Permalink
Browse files

Make X::TypeCheck::Assignment not barf on strange $got values

Makes the error mentioned in R#2503 slightly less LTA.
  • Loading branch information...
lizmat committed Dec 31, 2018
1 parent b6c8f5e commit a6d8858e415ae8c8036e3de336ece16029784564
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Exception.pm6
@@ -2292,7 +2292,7 @@ my class X::TypeCheck::Assignment is X::TypeCheck {
method message {
my $to = $.symbol.defined && $.symbol ne '$'
?? " to $.symbol" !! "";
my $is-itself := $.expected =:= $.got;
my $is-itself := try $.expected =:= $.got;
my $expected = $is-itself
?? "expected type $.expectedn cannot be itself"
!! "expected $.expectedn but got $.gotn";

0 comments on commit a6d8858

Please sign in to comment.
You can’t perform that action at this time.