Skip to content

Commit

Permalink
RakuAST: throw targeted exception when trying to re-bind term
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Apr 20, 2024
1 parent 171307e commit 5f8c7bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Raku/ast/term.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class RakuAST::Term::Name
Nil
}

method build-bind-exception(RakuAST::Resolver $resolver) {
$resolver.build-exception: 'X::Bind::Rebind',
:target(self.name.canonicalize)
}

method IMPL-EXPR-QAST(RakuAST::IMPL::QASTContext $context) {
if $!name.is-pseudo-package {
$!name.IMPL-QAST-PSEUDO-PACKAGE-LOOKUP($context);
Expand Down

0 comments on commit 5f8c7bb

Please sign in to comment.