Migrate CompileKotlinAgainstKotlin test to multi-file framework

This commit is contained in:
Alexander Udalov
2016-02-24 12:02:25 +03:00
committed by Alexander Udalov
parent 5884d4be79
commit cc8af573f9
69 changed files with 569 additions and 358 deletions
@@ -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()
}