Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt
T
Svetlana Isakova 4f28a0a9a1 KT-8879 Stackoverflow exception on completion from inference
#KT-8879 Fixed
Added ConstraintContext storing 'derivedFrom' variables.
This information is used to prevent infinite recursion:
if a variable was substituted in a type of a bound, it shouldn't be substituted there for the second time.
2015-09-07 17:05:39 +03:00

12 lines
286 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Inv<I>
interface Inv2<I>
fun <T: Inv2<T>> foo(klass: Inv<T>): String? = null
fun <X> bar(): Inv<X> = null!!
fun test() {
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>())
}