Skip to content

Commit 90fd17e

Browse files
viratyosinfacebook-github-bot
authored andcommitted
Add a test for $x:T is vec<_>
Summary: I was working on adding predicate-base refinement support for generic classes and discovered that it had issues with this case (due to supportdyn) which I guess wasn't already covered in the test cases. This diff adds such a test. Reviewed By: mheiber Differential Revision: D76777602 fbshipit-source-id: be30ffa1305e7553d23244949fb08eb119b1b267
1 parent 1828cf0 commit 90fd17e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?hh
2+
3+
function takes_vec(vec<mixed> $x): void {}
4+
5+
function foo<T>(T $x): void {
6+
if ($x is vec<_>) {
7+
takes_vec($x);
8+
}
9+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
No errors

0 commit comments

Comments
 (0)