Skip to content

Commit

Permalink
RakuAST: make $?CLASS and ::?CLASS available to role bodies at compil…
Browse files Browse the repository at this point in the history
…e time

While runtime lookup of these type captures already worked, the compiler
itself wasn't aware of their existence.
  • Loading branch information
niner committed Jan 22, 2023
1 parent 9998d13 commit a8edae2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Raku/ast/package.rakumod
Expand Up @@ -242,6 +242,12 @@ class RakuAST::Package
name => '::?ROLE', value => self.stubbed-meta-object
)
);
$resolver.declare-lexical(
RakuAST::Type::Capture.new(RakuAST::Name.from-identifier('$?CLASS'))
);
$resolver.declare-lexical(
RakuAST::Type::Capture.new(RakuAST::Name.from-identifier('::?CLASS'))
);
}
elsif $!package-declarator eq 'module' {
$resolver.declare-lexical(
Expand Down

0 comments on commit a8edae2

Please sign in to comment.