-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Hash Comment Option to Repo Options
Summary: When the disallow hash comments option is enabled, the runtime flag is not used to set the getFactsOptions bit which results in the setting not being passed to the facts parser. Reviewed By: DavidSnider Differential Revision: D31357394 fbshipit-source-id: 80a1bc276d5ad88fdf5c96403384941f9517a4d4
- Loading branch information
1 parent
5f5df6c
commit ef20c5e
Showing
11 changed files
with
79 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?hh | ||
<<file:__EnableUnstableFeatures('enum_class_label')>> | ||
|
||
enum class Something: mixed { | ||
mixed a = 5; | ||
} | ||
|
||
function afunction(): void { | ||
my_function(#a); | ||
} | ||
|
||
function my_function( | ||
HH\EnumClass\Label<Something, mixed> $param, | ||
): void { | ||
echo "Hello, world.\n"; | ||
} | ||
|
||
<<__EntryPoint>> | ||
function main_hashbang() { | ||
var_dump(HH\facts_parse(NULL, vec[__FILE__], true, true)); | ||
afunction(); | ||
} |
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,39 @@ | ||
dict(1) { | ||
["%s/label_facts.php"]=> | ||
dict(7) { | ||
["constants"]=> | ||
vec(0) { | ||
} | ||
["functions"]=> | ||
vec(3) { | ||
string(9) "afunction" | ||
string(11) "my_function" | ||
string(13) "main_hashbang" | ||
} | ||
["md5sum0"]=> | ||
int(%s) | ||
["md5sum1"]=> | ||
int(%s) | ||
["sha1sum"]=> | ||
string(40) "%s" | ||
["typeAliases"]=> | ||
vec(0) { | ||
} | ||
["types"]=> | ||
vec(1) { | ||
dict(4) { | ||
["baseTypes"]=> | ||
vec(1) { | ||
string(19) "HH\BuiltinEnumClass" | ||
} | ||
["flags"]=> | ||
int(0) | ||
["kindOf"]=> | ||
string(4) "enum" | ||
["name"]=> | ||
string(9) "Something" | ||
} | ||
} | ||
} | ||
} | ||
Hello, world. |
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,2 @@ | ||
-vRuntime.Hack.Lang.AllowUnstableFeatures=1 | ||
-vRuntime.Hack.Lang.DisallowHashComments=1 |
Empty file.
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,2 @@ | ||
-vHack.Lang.AllowUnstableFeatures=1 | ||
-vHack.Lang.DisallowHashComments=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,6 @@ | ||
<?hh | ||
|
||
<<__EntryPoint>> | ||
function main_hashbang() { | ||
var_dump(HH\facts_parse(__DIR__, vec['hash_comment.php'], true, true)); | ||
} |
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,4 @@ | ||
dict(1) { | ||
["hash_comment.php"]=> | ||
NULL | ||
} |
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.Hack.Lang.DisallowHashComments=1 |
Empty file.
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 @@ | ||
-vHack.Lang.DisallowHashComments=1 |