848075192c
It leads to further infer type variable into those upper bounds which is forbidden Substituted upper bounds is ok because specific substituted types came from constraints of other proper positions, or if specific substituted type is from declared upper bound too, then there should be another declared upper bound with no substitution ^KT-51464 Fixed ^KT-47986 Fixed
15 lines
274 B
Kotlin
Vendored
15 lines
274 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
class Foo<K>
|
|
|
|
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
|
|
|
|
class Bar<K>
|
|
|
|
fun <K: Bar<N>, N: Bar<K>> Foo<K>.bar(x: Int = 1) {}
|
|
|
|
fun main() {
|
|
val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildFoo<!> {
|
|
bar()
|
|
}
|
|
}
|