-
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.
Offer 'did you mean' suggestions case-insensitively
Summary: Don't consider case when trying to find the most similar item in naming suggestions. Reviewed By: vsiles Differential Revision: D39328377 fbshipit-source-id: 3b2f21c233cce801c8b35621f41be643e0a37708
- Loading branch information
1 parent
ed46335
commit 3a3a5a5
Showing
3 changed files
with
26 additions
and
2 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
12 changes: 12 additions & 0 deletions
12
hphp/hack/test/typecheck/enum_class_label/class_missing_label_case.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,12 @@ | ||
<?hh | ||
|
||
enum class E: mixed { | ||
int car = 1; | ||
int CARROT = 42; | ||
} | ||
|
||
function takes_label(HH\EnumClass\Label<E, int> $_): void {} | ||
|
||
function call_it(): void { | ||
takes_label(#carrot); | ||
} |
8 changes: 8 additions & 0 deletions
8
hphp/hack/test/typecheck/enum_class_label/class_missing_label_case.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,8 @@ | ||
File "class_missing_label_case.php", line 11, characters 15-21: | ||
Enum class `E` does not contain a label named `carrot`. (Typing[4394]) | ||
File "class_missing_label_case.php", line 3, characters 12-12: | ||
`E` is defined here | ||
File "class_missing_label_case.php", line 5, characters 7-12: | ||
Did you mean `#CARROT`? | ||
File "class_missing_label_case.php", line 8, characters 41-41: | ||
This is why I expected an enum class label from `E`. |