File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ XP Compiler ChangeLog
66* Added PHP 8.4 emitter which natively emits property hooks and asymmetric
77 visibility syntax
88 (@thekid )
9- * Changed emitter to use native readonly classes in PHP 8.3 , fixing an
9+ * Changed emitter to use native readonly classes in PHP 8.2 , fixing an
1010 inconsistency with accessing undefined properties
1111 (@thekid )
1212
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ class PHP82 extends PHP {
2424 RewriteDynamicClassConstants,
2525 RewriteStaticVariableInitializations,
2626 RewriteProperties,
27- ReadonlyClasses,
2827 OmitConstantTypes
2928 ;
3029
Original file line number Diff line number Diff line change @@ -22,4 +22,12 @@ public function callable_static_method_syntax() {
2222 public function callable_instance_method_syntax () {
2323 Assert::equals ('$this->method(...); ' , $ this ->emit ('$this->method(...); ' ));
2424 }
25+
26+ #[Test]
27+ public function readonly_classes () {
28+ Assert::matches (
29+ '/readonly class [A-Z0-9]+{/ ' ,
30+ $ this ->emit ('readonly class %T { } ' )
31+ );
32+ }
2533}
You can’t perform that action at this time.
0 commit comments