Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix RT #118607
Give the same suggestion for a sub redeclaration as for a method.
  • Loading branch information
MasterDuke17 committed Aug 30, 2016
1 parent f2df2c5 commit 76a86d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Exception.pm
Expand Up @@ -947,7 +947,8 @@ my class X::Redeclaration does X::Comp {
has $.postfix = '';
has $.what = 'symbol';
method message() {
"Redeclaration of $.what $.symbol$.postfix";
my $m = "Redeclaration of $.what '$.symbol$.postfix'";
$m ~= " (did you mean to declare a multi-sub?)" if $.what eq 'routine';
}
}

Expand Down

0 comments on commit 76a86d4

Please sign in to comment.