-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIR] When subjects with dynamic types should be considered Any?
Right now, for when exhaustiveness checking, the lower-bound of flexible types is chosen. Dynamic types are flexible with a lower-bound of Nothing. This leads to the subject type being Nothing and no branches are required to be considered exhaustive. Dynamic types should instead use their upper-bound (Any?) for exhaustive checks. ^KT-71601 Fixed
- Loading branch information
1 parent
2af884e
commit 283de17
Showing
3 changed files
with
49 additions
and
15 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
1 change: 1 addition & 0 deletions
1
compiler/testData/diagnostics/tests/when/ExhaustiveDynamicType.kt
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