KTIJ-20826 Approximate builder inference stub types as type parameters
This is a temporary fix to avoid crashes in FIR IDE Of all stub types, only `ConeStubTypeForChainInference` is handled now, so we can catch the other possible errors with stub types (in the delegates' inference, for example) The fix introduced in this commit should be reworked when KT-50916 is fixed ^KTIJ-20826 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
baf4b3158c
commit
8befbc6375
+14
@@ -0,0 +1,14 @@
|
||||
// WITH_STDLIB
|
||||
package test
|
||||
|
||||
class Target<T> {
|
||||
fun add(t: T) {}
|
||||
}
|
||||
|
||||
fun <T> buildTarget(@BuilderInference block: Target<T>.() -> Unit): Target<T> {
|
||||
return Target<T>().apply { block() }
|
||||
}
|
||||
|
||||
fun test(s: String) {
|
||||
val result = buildTarget { <expr>add</expr>(s) }
|
||||
}
|
||||
Reference in New Issue
Block a user