Skip to content

Commit

Permalink
Wordwrap X::(Parameter|Syntax::Variable)::BadType message
Browse files Browse the repository at this point in the history
Also suggest using 'class' instead.
  • Loading branch information
lizmat committed Jul 6, 2020
1 parent 9396343 commit 58685ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Exception.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ my class X::Parameter::BadType does X::Comp {
has Mu $.type;
method message() {
my $what = ~$!type.HOW.WHAT.^name.match(/ .* '::' <(.*)> HOW/) // 'Namespace';
"$what $!type.^name() is insufficiently type-like to qualify a parameter"
"$what '$!type.^name()' is insufficiently type-like to qualify a parameter. Did you mean 'class'?".naive-word-wrapper
}
}

Expand Down Expand Up @@ -1495,7 +1495,7 @@ my class X::Syntax::Variable::BadType does X::Comp {
has Mu $.type;
method message() {
my $what = ~$!type.HOW.WHAT.^name.match(/ .* '::' <(.*)> HOW/) // 'Namespace';
"$what $!type.^name() is insufficiently type-like to qualify a variable"
"$what '$!type.^name()' is insufficiently type-like to qualify a variable. Did you mean 'class'?".naive-word-wrapper
}
}

Expand Down

0 comments on commit 58685ee

Please sign in to comment.