We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f0f7ab commit d477822Copy full SHA for d477822
Zend/tests/property_hooks/gh17101.phpt
@@ -0,0 +1,22 @@
1
+--TEST--
2
+GH-17101 (AST->string does not reproduce constructor property promotion correctly)
3
+--FILE--
4
+<?php
5
+
6
+try {
7
+ assert(false && new class {
8
+ public function __construct( #[Foo] public private(set) bool $boolVal = false { final set => $this->boolVal = 1;} ) {}
9
+ });
10
+} catch (Error $e) {
11
+ echo $e->getMessage(), "\n";
12
+}
13
14
+?>
15
+--EXPECT--
16
+assert(false && new class {
17
+ public function __construct(#[Foo] public private(set) bool $boolVal = false {
18
+ final set => $this->boolVal = 1;
19
+ }) {
20
+ }
21
22
+})
0 commit comments