Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Awesomeize insufficiently type-like message
  • Loading branch information
TimToady committed May 6, 2015
1 parent 240cf01 commit d7dbe15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -817,7 +817,8 @@ my class X::Parameter::MultipleTypeConstraints does X::Comp {
my class X::Parameter::BadType does X::Comp {
has Mu $.type;
method message() {
"$!type.^name() cannot be used as a type on a parameter"
my $what = ~$!type.HOW.WHAT.^name.match(/ .* '::' <(.*)> HOW/) // 'Namespace';
"$what $!type.^name() is insufficiently type-like to qualify a parameter"
}
}

Expand Down Expand Up @@ -963,7 +964,8 @@ my class X::Syntax::Variable::IndirectDeclaration does X::Syntax {
my class X::Syntax::Variable::BadType does X::Comp {
has Mu $.type;
method message() {
"$!type.^name() cannot be used as a type on a variable"
my $what = ~$!type.HOW.WHAT.^name.match(/ .* '::' <(.*)> HOW/) // 'Namespace';
"$what $!type.^name() is insufficiently type-like to qualify a variable"
}
}

Expand Down

0 comments on commit d7dbe15

Please sign in to comment.