Skip to content

Commit 253cdb8

Browse files
committed
Test support for wildcards and union types in arrays
1 parent 942c573 commit 253cdb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/php/lang/ast/syntax/php/unittest/TypeMatchingTest.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ private function fixtures() {
3535
yield ['[] is array<string, int>', true];
3636
yield ['["one" => 1] is array<string, int>', true];
3737
yield ['[1] is array<string, int>', false];
38+
yield ['[1, "test"] is array<mixed>', true];
39+
yield ['[1, "test"] is array<int|string>', true];
40+
yield ['[null, "test"] is array<int|string>', false];
3841

3942
yield ['$this is object', true];
4043
yield ['new Date() is object', true];

0 commit comments

Comments
 (0)