summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt.after
blob: f681c9ba0403f49d81121ee8033fb023fae57b01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// "Create type parameter 'X' in class 'Foo'" "true"
// ERROR: Unresolved reference: _
// ERROR: Unresolved reference: _
// ERROR: Unresolved reference: _
// ERROR: Type mismatch: inferred type is A<I> but A<List<[ERROR : _]>> was expected
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
class A<T : List<T>>

interface I : List<I>

open class Foo<X : List<X>>(x: A<X>)

class Bar : Foo<List<_>>(A())

fun test() {
    Foo<List<_>>(A())
    Foo(A<I>())

    object : Foo<List<_>>(A<I>()) {

    }
}