Skip to content

Commit

Permalink
RakuAST: fix registration of packages with multi-part names
Browse files Browse the repository at this point in the history
We accidentally added packages with their longname (e.g. Foo::Bar) into
the parent package's stash instead of only the last part.
  • Loading branch information
niner committed Oct 30, 2022
1 parent 7e53692 commit e92e3c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Raku/ast/package.rakumod
Expand Up @@ -120,7 +120,7 @@ class RakuAST::Package is RakuAST::StubbyMeta is RakuAST::Term
my $package := Perl6::Metamodel::PackageHOW.new_type(name => $longname);
$package.HOW.compose($package);
my %stash := $resolver.IMPL-STASH-HASH($target);
%stash{$longname} := $package;
%stash{$_.name} := $package;
$target := $package;
}
}
Expand All @@ -143,7 +143,7 @@ class RakuAST::Package is RakuAST::StubbyMeta is RakuAST::Term
my $package := Perl6::Metamodel::PackageHOW.new_type(name => $longname);
$package.HOW.compose($package);
my %stash := $resolver.IMPL-STASH-HASH($target);
%stash{$longname} := $package;
%stash{$_.name} := $package;
$target := $package;
}
}
Expand Down

0 comments on commit e92e3c5

Please sign in to comment.