Introduce warnings reporting by missed constraints because of incorrect optimization in the constraints processor
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
sealed class Subtype<A1, B1> {
|
||||
abstract fun cast(value: A1): B1
|
||||
class Trivial<A2 : B2, B2> : Subtype<A2, B2>() {
|
||||
override fun cast(value: A2): B2 = value
|
||||
}
|
||||
}
|
||||
|
||||
fun <A, B> unsafeCast(value: A): B {
|
||||
val proof: Subtype<A, B> = Subtype.Trivial()
|
||||
return proof.cast(value)
|
||||
}
|
||||
|
||||
fun box() = "OK"
|
||||
Reference in New Issue
Block a user