We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa3dd1a commit 9d00be1Copy full SHA for 9d00be1
src/test/php/lang/ast/unittest/emit/InitializeWithExpressionsTest.class.php
@@ -64,6 +64,19 @@ public function run() {
64
Assert::equals(new Handle(1), $r());
65
}
66
67
+ #[Test]
68
+ public function using_new_referencing_this() {
69
+ $r= $this->run('use lang\ast\unittest\emit\Handle; class <T> {
70
+ private $id= 1;
71
+ private $h= new Handle($this->id);
72
+
73
+ public function run() {
74
+ return $this->h;
75
+ }
76
+ }');
77
+ Assert::equals(new Handle(1), $r);
78
79
80
#[Test]
81
public function using_anonymous_classes() {
82
$r= $this->run('class <T> {
0 commit comments