Skip to content

Commit 2e34418

Browse files
Mistral Contrastinfacebook-github-bot
Mistral Contrastin
authored andcommitted
Add regression test with like nullable types
Summary: There is a bug with like nullable types. This diff adds a regression test to capture the erroneous behaviour. Reviewed By: mdko Differential Revision: D63980234 fbshipit-source-id: c70c7023e857676ad2705dd8e7c3c6838e7f51e9
1 parent 36b89ce commit 2e34418

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?hh
2+
3+
function takes(~?int $i): void {
4+
var_dump($i);
5+
}
6+
7+
<<__EntryPoint>>
8+
function main(): void {
9+
takes(null);
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Catchable fatal error: Argument 1 passed to takes() must be an instance of int, null given in %s/test/slow/like_types/like_nullable.php on line 9

0 commit comments

Comments
 (0)