-
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.
Make disjointness check in equality check fire even when dynamic is p…
…resent Summary: The equality disjointness check doesn't fire if one of the types is a like-type. So, for example, this is accepted: ``` function make_tuple():(int,string) { ... } function testit(): bool { return make_tuple() === 1; } ``` In contrast, the user-controllable `<<__NonDisjoint>>` feature *does* see through likes. This diff makes equality behave the same way. Reviewed By: CatherineGasnier Differential Revision: D66362246 fbshipit-source-id: 67e122b16aa5b3643b352056ea732c91b8dca7d7
- Loading branch information
1 parent
688937e
commit aeb075f
Showing
6 changed files
with
75 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
WARN: File "not_trivial_strict_eq.php", line 37, characters 10-18: | ||
WARN: File "not_trivial_strict_eq.php", line 41, characters 10-18: | ||
This expression is likely always `false` (Warn[12001]) | ||
File "not_trivial_strict_eq.php", line 35, characters 13-15: | ||
File "not_trivial_strict_eq.php", line 39, characters 13-15: | ||
This is an int | ||
File "not_trivial_strict_eq.php", line 35, characters 22-27: | ||
File "not_trivial_strict_eq.php", line 39, characters 22-27: | ||
This is a string | ||
WARN: File "not_trivial_strict_eq.php", line 49, characters 10-27: | ||
Invalid comparison: This expression will always return `false`. | ||
A value of type `(int, string)` can never be equal to a value of type `int` (Warn[12007]) | ||
ERROR: File "not_trivial_strict_eq.php", line 12, characters 10-10: | ||
Was expecting a return type hint (Typing[4030]) |