[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// FILE: main.kt
|
||||
class Inv<T>(val x: T)
|
||||
|
||||
class A<T : Inv<in T>> {
|
||||
fun foo(): T = null!!
|
||||
}
|
||||
|
||||
class Inv2<T : Inv2<in T>>(val x: T)
|
||||
|
||||
fun main(a: A<*>, j: JavaClass<*>, i2: Inv2<*>) {
|
||||
// Probably it's too restrictive to suppose star projection type here as Any?,
|
||||
// but looks like we can refine it later
|
||||
a.foo() checkType { <!UNRESOLVED_REFERENCE!>_<!><Any?>() }
|
||||
j.foo() checkType { <!UNRESOLVED_REFERENCE!>_<!><Any?>() }
|
||||
i2.x checkType { <!UNRESOLVED_REFERENCE!>_<!><Any?>() }
|
||||
|
||||
j.<!INAPPLICABLE_CANDIDATE!>bar<!>(1, 2, Any())
|
||||
j.bar(null)
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass<T extends JavaClass<? super T>> {
|
||||
public void bar(T... x) {}
|
||||
public T foo() {}
|
||||
}
|
||||
Reference in New Issue
Block a user