Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix error in some throws_like tests
The test would throw an exception "Cannot look up attributes in a type object".
As part of debugging, I decided to make these methods only take defined
objects, in the hope that the error message would get clearer.  To my
surprise, the problem went away completely.  This feels like action at
a distance.
  • Loading branch information
lizmat committed Aug 17, 2014
1 parent 6c9be38 commit 509d47a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -611,10 +611,10 @@ my class X::Undeclared::Symbols does X::Comp {
has %.unk_routines;
has %.routine_suggestion;
has %.type_suggestion;
multi method gist(:$sorry = True) {
multi method gist(X::Undeclared::Symbols:D :$sorry = True) {
($sorry ?? self.sorry_heading() !! "") ~ self.message
}
method message() {
method message(X::Undeclared::Symbols:D) {
sub l(@l) {
my @lu = @l.map({ nqp::hllize($_) }).uniq.sort;
'used at line' ~ (@lu == 1 ?? ' ' !! 's ') ~ @lu.join(', ')
Expand Down

0 comments on commit 509d47a

Please sign in to comment.