NI: do substitution stub types during updating trace for lambda (these stub types can appear from the builder inference as postponed variables)
^KT-40060 Fixed
This commit is contained in:
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
class TypeDefinition<K : Any> {
|
||||
fun parse(parser: (serializedValue: String) -> K?): Unit {}
|
||||
fun serialize(parser: (value: K) -> Any?): Unit {}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalTypeInference::class)
|
||||
fun <T : Any> defineType(@BuilderInference definition: TypeDefinition<T>.() -> Unit): Unit {}
|
||||
|
||||
fun test() {
|
||||
defineType {
|
||||
parse { it as Int }
|
||||
serialize { it.toString() }
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user