-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop redundant Widen operator from RHS of subtyping rule
Statement 1: if (Widen(X) <: Widen(Y)) is true expression then Widen(X) <: Y stays true expression Statement 2: There is no such X and Y that the both following expressions evaluate to true Widen(X) <: Widen(Y) is false Widen(X) <: Y is true In general case, statement 2 is not valid In our specific case where Widen is defined the way it's defined, statement 2 is valid Given that in our case statement 1 and statement 2 are both valid, Widen is redundant in the RHS and confuses readers Informally: the intention is to make the widened type more appealing for the overload resolution, so only LHS should be widened
- Loading branch information
1 parent
6906848
commit 1f2e314
Showing
2 changed files
with
3 additions
and
3 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