Skip to content

Commit

Permalink
RakuAST: check for MONKEY-TYPING when augmenting
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 29, 2023
1 parent bd53ad2 commit c727c2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Raku/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,9 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
my $name := $name-match ?? $name-match.ast !! Nodify('Name');
my $package;
if $scope eq 'augment' {
$/.typed-panic('X::Syntax::Augment::WithoutMonkeyTyping')
unless $*LANG.pragma('MONKEY-TYPING');

$package := Nodify('Package','Augmented').new(
:$declarator, :$how, :$name, :$scope
);
Expand Down

0 comments on commit c727c2a

Please sign in to comment.