ResultTypeResolver: don't allow Nothing as ILT subtype

#KT-58379 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-05-03 11:09:32 +02:00
committed by Space Team
parent 6ae648f6f6
commit 1c7ffb3276
3 changed files with 4 additions and 27 deletions
@@ -1,25 +0,0 @@
// WITH_STDLIB
import Cause.*
typealias ChallengeFunction = suspend (String) -> Unit
enum class Cause {
FIRST,
SECOND,
ERROR,
LAST
}
class Some {
internal val register = mutableListOf<Pair<Cause, ChallengeFunction>>()
internal val challenges: List<ChallengeFunction>
get() = <!NEW_INFERENCE_ERROR!>register.filter { it.first != ERROR }.sortedBy {
when (it.first) {
FIRST -> 1
SECOND -> 2
else -> throw AssertionError()
}
}<!>.map { it.second }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
import Cause.*