Skip to content

Commit

Permalink
RakuAST: Fix reporting of unknown routines
Browse files Browse the repository at this point in the history
The AST cannot supply the line number yet and giving that as 'unknown'
broke reporting of exceptions. Use -1 as a marker instead so the user at
least gets a name and a message.
  • Loading branch information
niner committed Feb 13, 2023
1 parent cbe8d97 commit 63d48fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Raku/ast/scoping.rakumod
Expand Up @@ -623,7 +623,7 @@ class RakuAST::UndeclaredSymbolDescription::Routine
is RakuAST::UndeclaredSymbolDescription
{
method IMPL-REPORT(RakuAST::Lookup $node, Mu $types, Mu $routines, Mu $other) {
nqp::bindkey($routines, self.name, ['unknown']);
nqp::bindkey($routines, self.name, [-1]);
}
}

Expand Down

0 comments on commit 63d48fa

Please sign in to comment.