FE: add reproducer for KT-54004
This commit is contained in:
committed by
Space Team
parent
80c0c33670
commit
0940707fd4
+20
@@ -0,0 +1,20 @@
|
||||
class Foo<T : Any> {
|
||||
fun doSmthng(arg: T) {}
|
||||
var a: T? = null
|
||||
}
|
||||
|
||||
fun <T : Any> myBuilder(block: Foo<T>.() -> Unit) : Foo<T> = Foo<T>().apply(block)
|
||||
|
||||
fun main() {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myBuilder<!> {
|
||||
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!> = "some string"
|
||||
}
|
||||
|
||||
val x = 57
|
||||
val value = myBuilder {
|
||||
doSmthng("one ")
|
||||
a = 57
|
||||
a = x
|
||||
}
|
||||
println(value.a?.count { it in 'l' .. 'q' })
|
||||
}
|
||||
Reference in New Issue
Block a user