Defining flexible type semantic equality through subtyping
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// FILE: p/J.java
|
||||
|
||||
package p;
|
||||
|
||||
public class J<T> {
|
||||
public void foo(Ref<T[]> r) {}
|
||||
}
|
||||
|
||||
// FILE: p/Ref.java
|
||||
|
||||
package p;
|
||||
|
||||
public class Ref<T> {
|
||||
public static <T> Ref<T> create() { return null; }
|
||||
}
|
||||
|
||||
// FILE: k.kt
|
||||
|
||||
import p.*
|
||||
|
||||
fun main(j: J<String>) {
|
||||
val r = Ref.create<Array<String>>()
|
||||
j.foo(r)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun main(/*0*/ j: p.J<kotlin.String>): kotlin.Unit
|
||||
@@ -3,8 +3,7 @@ package test
|
||||
public trait ErrorTypes {
|
||||
|
||||
public trait Sub : test.ErrorTypes.Super {
|
||||
public abstract fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List<kotlin.Array<(out) [ERROR : Unresolved java classifier: T]!>!>!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List<kotlin.Array<(out) [ERROR : Unresolved java classifier: T]!>!>!): kotlin.Unit
|
||||
public abstract override /*1*/ fun errorTypeInParameter(/*0*/ list: kotlin.(Mutable)List<kotlin.Array<(out) [ERROR : Unresolved java classifier: T]!>!>!): kotlin.Unit
|
||||
public abstract override /*1*/ fun returnErrorType(): [ERROR : Unresolved java classifier: T]!
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user