Skip to content

Commit 47001b3

Browse files
committed
Install $?CLASS as a lexical symbol, not package. Now consistent with roles and classes, and also with nqpclr.
1 parent 4150953 commit 47001b3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/NQP/Actions.pm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,6 @@ class NQP::Actions is HLL::Actions {
448448
PAST::Op.new( :pasttype('bind'),
449449
PAST::Var.new( :name('type_obj'), :scope('register'), :isdecl(1) ),
450450
$*SC.get_slot_past_for_object($*PKGMETA)
451-
),
452-
PAST::Op.new( :pasttype('bind'),
453-
PAST::Var.new( :name('$?CLASS') ),
454-
PAST::Var.new( :name('type_obj'), :scope('register') )
455451
)
456452
));
457453

@@ -477,8 +473,7 @@ class NQP::Actions is HLL::Actions {
477473
}
478474
else {
479475
$past.blocktype('immediate');
480-
$past.unshift(PAST::Var.new( :name('$?CLASS'), :scope('package'), :isdecl(1) ));
481-
$past.symbol('$?CLASS', :scope('package'));
476+
$*SC.install_lexical_symbol($past, '$?CLASS', $*PKGMETA);
482477
}
483478

484479
# Add call to add_parent if we have one.

0 commit comments

Comments
 (0)