Files
kotlin-fork/compiler/testData/diagnostics/tests/inference
Denis.Zharkov 6651e6ed8c K2: Avoid inappropriate approximation of captured type to Nothing?
There's a heuristic for approximation of a captured type that once
it has non-trivial lower bound (other than Nothing), it's worth
approximating it to sub-type even while the containing
top-level type is being approximated to super-type.

And that sounds reasonable in case the lower bound is indeed non-trivial,
but that's not the case because nullability here comes from
the nullability of captured type position.

So, the fix is basically not to treat such approximations as non-trivial.
And while that seems to be a bit of a change in the language semantics,
it still looks reasonable (see other changes in test data and KT-58087)

^KT-57958 Fixed
^KT-58087 Fixed
2023-04-26 09:21:19 +00:00
..
2022-02-25 11:46:27 +00:00
2022-02-25 11:46:27 +00:00
2022-08-31 09:45:54 +00:00
2022-08-31 09:45:54 +00:00
2022-06-29 10:20:30 +02:00
2022-08-30 15:56:31 +00:00
2022-08-30 15:56:31 +00:00