Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split HAC CheckMisc into CheckArrayPlus and CheckArrayKeyCast
Summary: What it says on the tin--split these notices to be controlled by separate flags Reviewed By: viratyosin Differential Revision: D10222024 fbshipit-source-id: b4d4ec8f1cfd18e92bb4dba4d540e6c62aa0809b
- Loading branch information
Showing
28 changed files
with
98 additions
and
26 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,2 +1,2 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckMisc=1 | ||
-vEval.HackArrCompatCheckArrayKeyCast=1 |
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,2 +1,2 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckMisc=1 | ||
-vEval.HackArrCompatCheckArrayPlus=1 |
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,2 +1,2 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckMisc=1 | ||
-vEval.HackArrCompatCheckArrayKeyCast=1 |
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,5 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckIntishCast=1 | ||
-vEval.HackArrCompatCheckCompare=1 | ||
-vEval.HackArrCompatCheckMisc=1 | ||
-vEval.HackArrCompatCheckArrayKeyCast=1 | ||
-vEval.HackArrCompatCheckArrayPlus=1 |
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,10 @@ | ||
<?hh | ||
|
||
<<__EntryPoint>> | ||
function main () { | ||
$a = darray["" => "empty string", 1 => "one", 0 => "zero"]; | ||
var_dump($a + darray["more stuff" => "yep"]); | ||
var_dump($a[null]); | ||
var_dump($a[true]); | ||
var_dump($a[0.0]); | ||
} |
19 changes: 19 additions & 0 deletions
19
hphp/test/slow/hack_arr_compat/split_misc_notices.php.expectf
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,19 @@ | ||
array(4) { | ||
[""]=> | ||
string(12) "empty string" | ||
[1]=> | ||
string(3) "one" | ||
[0]=> | ||
string(4) "zero" | ||
["more stuff"]=> | ||
string(3) "yep" | ||
} | ||
|
||
Notice: Hack Array Compat: Implicit conversion of null to array key in %s on line %d | ||
string(12) "empty string" | ||
|
||
Notice: Hack Array Compat: Implicit conversion of bool to array key in %s on line %d | ||
string(3) "one" | ||
|
||
Notice: Hack Array Compat: Implicit conversion of double to array key in %s on line %d | ||
string(4) "zero" |
1 change: 1 addition & 0 deletions
1
hphp/test/slow/hack_arr_compat/split_misc_notices.php.hphp_opts
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 @@ | ||
-vRuntime.Eval.HackArrCompatNotices=true -d hhvm.php7.all=0 |
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,3 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckArrayKeyCast=1 | ||
|
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,10 @@ | ||
<?hh | ||
|
||
<<__EntryPoint>> | ||
function main () { | ||
$a = darray["" => "empty string", 1 => "one", 0 => "zero"]; | ||
var_dump($a + darray["more stuff" => "yep"]); | ||
var_dump($a[null]); | ||
var_dump($a[true]); | ||
var_dump($a[0.0]); | ||
} |
15 changes: 15 additions & 0 deletions
15
hphp/test/slow/hack_arr_compat/split_misc_notices_2.php.expectf
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,15 @@ | ||
|
||
Notice: Hack Array Compat: Using + operator on arrays in %s on line %d | ||
array(4) { | ||
[""]=> | ||
string(12) "empty string" | ||
[1]=> | ||
string(3) "one" | ||
[0]=> | ||
string(4) "zero" | ||
["more stuff"]=> | ||
string(3) "yep" | ||
} | ||
string(12) "empty string" | ||
string(3) "one" | ||
string(4) "zero" |
1 change: 1 addition & 0 deletions
1
hphp/test/slow/hack_arr_compat/split_misc_notices_2.php.hphp_opts
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 @@ | ||
-vRuntime.Eval.HackArrCompatNotices=true -d hhvm.php7.all=0 |
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,3 @@ | ||
-vEval.HackArrCompatNotices=1 | ||
-vEval.HackArrCompatCheckArrayPlus=1 | ||
|
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 +1 @@ | ||
-vHackArrCompatNotices=1 -vHackArrCompatCheckMisc=1 -vJitEnableRenameFunction=0 -vRuntime.Hack.Lang.DisallowDynamicVarEnvFuncs=1 -vHackArrCompatCheckIntishCast=1 | ||
-vHackArrCompatNotices=1 -vHackArrCompatCheckArrayKeyCast=1 -vJitEnableRenameFunction=0 -vRuntime.Hack.Lang.DisallowDynamicVarEnvFuncs=1 -vHackArrCompatCheckIntishCast=1 |
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 +1 @@ | ||
-vEval.HackArrCompatNotices=1 -vEval.HackArrCompatCheckMisc=1 -vEval.JitEnableRenameFunction=0 -vHack.Lang.DisallowDynamicVarEnvFuncs=1 -vEval.HackArrCompatCheckIntishCast=1 | ||
-vEval.HackArrCompatNotices=1 -vEval.HackArrCompatCheckArrayKeyCast=1 -vEval.JitEnableRenameFunction=0 -vHack.Lang.DisallowDynamicVarEnvFuncs=1 -vEval.HackArrCompatCheckIntishCast=1 |