Migrate CompileKotlinAgainstKotlin test to multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
5884d4be79
commit
cc8af573f9
@@ -0,0 +1,25 @@
|
||||
// FILE: A.kt
|
||||
|
||||
package a
|
||||
|
||||
interface Rec<R, out T: Rec<R, T>> {
|
||||
fun t(): T
|
||||
}
|
||||
|
||||
interface Super {
|
||||
fun foo(p: Rec<*, *>) = p.t()
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
import a.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val declaredMethod = Super::class.java.getDeclaredMethod("foo", Rec::class.java)
|
||||
val genericString = declaredMethod.toGenericString()
|
||||
if (genericString != "public abstract a.Rec<?, ?> a.Super.foo(a.Rec<?, ?>)") throw AssertionError(genericString)
|
||||
}
|
||||
|
||||
fun test(s: Super, p: Rec<*, *>) {
|
||||
s.foo(p).t().t().t()
|
||||
}
|
||||
Reference in New Issue
Block a user