mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
Consider common supertype of `S` and `Nothing`, where `S` has nullable upper bound or it's flexible. Before the fix, result was `S?`, which is correct but too conservative. Now, we'll preserve nullability of resulting type if it's already nullable. This happened because we were failing to find path of not-nullable types from `Nothing` to `S`, which should obviously exists by semantics of Nothing