File tree 3 files changed +9
-2
lines changed
test/php/lang/ast/unittest/emit
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ XP Compiler ChangeLog
6
6
* Added PHP 8.4 emitter which natively emits property hooks and asymmetric
7
7
visibility syntax
8
8
(@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
10
10
inconsistency with accessing undefined properties
11
11
(@thekid )
12
12
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ class PHP82 extends PHP {
24
24
RewriteDynamicClassConstants,
25
25
RewriteStaticVariableInitializations,
26
26
RewriteProperties,
27
- ReadonlyClasses,
28
27
OmitConstantTypes
29
28
;
30
29
Original file line number Diff line number Diff line change @@ -22,4 +22,12 @@ public function callable_static_method_syntax() {
22
22
public function callable_instance_method_syntax () {
23
23
Assert::equals ('$this->method(...); ' , $ this ->emit ('$this->method(...); ' ));
24
24
}
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
+ }
25
33
}
You can’t perform that action at this time.
0 commit comments