Data flow-based exhaustiveness checking #451
serras
announced in
keep-discussions
Replies: 1 comment 1 reply
-
Any chance this will extend to contracts? Having a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Exhaustiveness checking as currently implemented in Kotlin works in a local fashion, taking into account only the branches of the when being inspected. We propose to take a more global approach, by augmenting the current smart casting framework with negative information.
Link to the proposal text
ℹ️ This proposal is already implemented as part of 2.2.20. We initially saw this as just a "compiler improvement", but given that the scope has ended up being broader, we're publishing this to get additional community feedback.
Beta Was this translation helpful? Give feedback.
All reactions