From f8956ce06927d75d1549ddf25d24162c3025b819 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Thu, 13 Aug 2015 20:04:08 +0200 Subject: [PATCH] Bring back "Undeclared routine" messages Suggestions still broken however. --- src/core/Exception.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/Exception.pm b/src/core/Exception.pm index 23ed8c66cd4..a1638cd61a2 100644 --- a/src/core/Exception.pm +++ b/src/core/Exception.pm @@ -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 { @@ -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"; }