Skip to content

Commit 82299e2

Browse files
committed
Optimize xp::$meta
1 parent 0efd60e commit 82299e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/php/lang/ast/emit/FinalProperties.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ protected function emitProperty($result, $property) {
1818
$modifiers|= $lookup[$name];
1919
}
2020

21+
// Emit without final modifier, store `final` in xp::$meta
2122
$property->modifiers= array_diff($property->modifiers, ['final']);
2223
parent::emitProperty($result, $property);
23-
$result->codegen->scope[0]->meta[self::PROPERTY][$property->name][DETAIL_ARGUMENTS]= [$modifiers];
24+
$result->codegen->scope[0]->meta[self::PROPERTY][$property->name][DETAIL_ARGUMENTS]= [MODIFIER_FINAL];
2425
}
2526
}

0 commit comments

Comments
 (0)