Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
darray and varray permit zero type arguments in non-strict files
Reviewed By: KendallHopkins Differential Revision: D5023838 fbshipit-source-id: 218d2014a31f62bada2384165247ccdb932ba8f0
- Loading branch information
1 parent
2a45f66
commit 6818d4c
Showing
7 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
hphp/hack/test/typecheck/array/allow_zero_type_parameters_for_non_strict_darray.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?hh | ||
|
||
function test(): darray { | ||
return darray[]; | ||
} |
1 change: 1 addition & 0 deletions
1
hphp/hack/test/typecheck/array/allow_zero_type_parameters_for_non_strict_darray.php.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No errors |
5 changes: 5 additions & 0 deletions
5
hphp/hack/test/typecheck/array/allow_zero_type_parameters_for_non_strict_varray.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?hh | ||
|
||
function test(): varray { | ||
return varray[0, 1, 2]; | ||
} |
1 change: 1 addition & 0 deletions
1
hphp/hack/test/typecheck/array/allow_zero_type_parameters_for_non_strict_varray.php.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
No errors |
2 changes: 1 addition & 1 deletion
2
hphp/hack/test/typecheck/array/disallow_zero_type_parameters_for_darray.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?hh | ||
<?hh // strict | ||
|
||
function test(): darray { | ||
return darray[]; | ||
|
2 changes: 1 addition & 1 deletion
2
hphp/hack/test/typecheck/array/disallow_zero_type_parameters_for_varray.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?hh | ||
<?hh // strict | ||
|
||
function test(): varray { | ||
return varray[0, 1, 2]; | ||
|