Skip to content

Commit

Permalink
RakuAST: fix error in our-scoped constant exists check
Browse files Browse the repository at this point in the history
Need to ask the stash, not the meta class
  • Loading branch information
niner committed Mar 5, 2023
1 parent 1bfe7a0 commit e3e250c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Raku/ast/variable-declaration.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class RakuAST::VarDeclaration::Constant

if self.scope eq 'our' {
my $name := nqp::getattr_s(self, RakuAST::VarDeclaration::Constant, '$!name');
if $!package.HOW.EXISTS-KEY($name) {
if $!package.WHO.EXISTS-KEY($name) {
nqp::die("already have an 'our constant $name' in the package");
}
}
Expand Down

0 comments on commit e3e250c

Please sign in to comment.