-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make type guard function types invariant in the type guarded for.
- Fix one break in the compiler. - Type guards like `isNetworked(): this is (Networked & this)` have been obsolete in favor of `isNetworked(): this is Networked` ever since narrowing was enhanced to take an intersection in a370908, and the first form now causes a problem: a subclass fails to be a subtype of its superclass because `this` appears in a non-covariant position. So replace all occurrences of the first form with the second form in the test suite. Fixes #26981.
- Loading branch information
1 parent
bbf559b
commit 07cf82a
Showing
19 changed files
with
274 additions
and
223 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
Oops, something went wrong.