Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 42ba2b8

Browse files
committed
Skip a test assertion that's invalid on 4.103
1 parent 69e4eb0 commit 42ba2b8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/ReifiedGenericsTest.hack

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ final class ReifiedGenericsTest extends \Facebook\HackTest\HackTest {
4040
public function testShapeOfVecAndDicts(): void {
4141
$valid = shape('vec' => vec['foo', 'bar'], 'dict' => dict[1 => 2]);
4242
$coercable = dict['vec' => vec['foo', 'bar'], 'dict' => darray[1 => 2]];
43+
4344
expect(matches<this::TShapeOfVecAndDicts>($valid))->toBeSame($valid);
44-
expect(() ==> matches<this::TShapeOfVecAndDicts>($coercable))
45-
->toThrow(IncorrectTypeException::class);
45+
if (darray[] !== dict[]) {
46+
// They are equivalent as of v4.103
47+
expect(() ==> matches<this::TShapeOfVecAndDicts>($coercable))
48+
->toThrow(IncorrectTypeException::class);
49+
}
4650
expect(TypeCoerce\match<this::TShapeOfVecAndDicts>($coercable))
4751
->toBeSame($valid);
4852
expect(() ==> TypeCoerce\match<this::TShapeOfVecAndDicts>('hello'))

0 commit comments

Comments
 (0)