[FE 1.0] Set a fixation priority for self type variables less than any of ready for fixation kinds
^KT-51040 Fixed ^KT-49838
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
import java.util.*
|
||||
|
||||
inline fun <reified T : Enum<T>> emptyEnumSet(): EnumSet<T> = EnumSet.noneOf(T::class.java)
|
||||
fun <T : Enum<T>> enumSetOf(e: T): EnumSet<T> = EnumSet.of(e)
|
||||
|
||||
enum class SomeEnum { ONE }
|
||||
val set = enumSetOf(SomeEnum.ONE).takeIf { it.size > 0 } ?: emptyEnumSet()
|
||||
|
||||
fun box(): String {
|
||||
return if (set.first() == SomeEnum.ONE) "OK" else "NOK"
|
||||
}
|
||||
@@ -1,6 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FIR status: several false UPPER_BOUND_VIOLATED are reported
|
||||
|
||||
abstract class Interpreter<IS, TS, SELF>
|
||||
where IS : Interpreter.Intermediary<SELF>,
|
||||
TS : Interpreter.Terminal<SELF>,
|
||||
|
||||
Reference in New Issue
Block a user