Skip to content

Commit 0019bb2

Browse files
committed
Verify nested new statements work
See https://externals.io/message/113347#113352
1 parent 1235334 commit 0019bb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/php/lang/ast/unittest/emit/InitializeWithExpressionsTest.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ private function expressions() {
2323
yield ['self::INITIAL', 'initial'];
2424
yield ['Handle::$DEFAULT', Handle::$DEFAULT];
2525
yield ['new Handle(0)', new Handle(0)];
26+
yield ['new FileInput(new Handle(0))', new FileInput(new Handle(0))];
2627
yield ['[new Handle(0)]', [new Handle(0)]];
2728
}
2829

2930
#[Test, Values('expressions')]
3031
public function property($declaration, $expected) {
31-
Assert::equals($expected, $this->run(sprintf('use lang\ast\unittest\emit\Handle; class <T> {
32+
Assert::equals($expected, $this->run(sprintf('use lang\ast\unittest\emit\{FileInput, Handle}; class <T> {
3233
const INITIAL= "initial";
3334
private $h= %s;
3435

0 commit comments

Comments
 (0)