// !CHECK_TYPE // !DIAGNOSTICS: -UNUSED_PARAMETER // FILE: main.kt class Inv(val x: T) class A> { fun foo(): T = null!! } class Inv2<T : Inv2>(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 { _() } j.foo() checkType { _() } i2.x checkType { _() } j.bar(1, 2, Any()) j.bar(null) } // FILE: JavaClass.java public class JavaClass> { public void bar(T... x) {} public T foo() {} }