Skip to content

Commit

Permalink
Bring back "Undeclared routine" messages
Browse files Browse the repository at this point in the history
Suggestions still broken however.
  • Loading branch information
niner committed Aug 13, 2015
1 parent 64c3661 commit f8956ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/Exception.pm
Expand Up @@ -770,7 +770,8 @@ my class X::Undeclared::Symbols does X::Comp {
'used at line' ~ (@lu == 1 ?? ' ' !! 's ') ~ @lu.join(', ')
}
sub s(@s) {
"Did you mean '{ @s.join("', '") }'?";
# XXX GLR this dies when trying to stringify, even though @s is just the List ("sec")
#"Did you mean '{ @s.join("', '") }'?";
}
my $r = "";
if %.post_types {
Expand Down Expand Up @@ -801,8 +802,8 @@ my class X::Undeclared::Symbols does X::Comp {
for %.unk_routines.sort(*.key) {
$r ~= " $_.key() &l($_.value)";
$r ~= " (in Perl 6 please use " ~ $obs{$_.key()} ~ " instead)" if $obs{$_.key()};
if +%.routine_suggestion{$_.key()} {
$r ~= ". " ~ s(%.routine_suggestion{$_.key()});
if +%.routine_suggestion{$_.key()}.list {
$r ~= ". " ~ s(%.routine_suggestion{$_.key()}.list);
}
$r ~= "\n";
}
Expand Down

0 comments on commit f8956ce

Please sign in to comment.