Serialization of star projections fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package a
|
||||
|
||||
trait Rec<R, out T: Rec<R, T>> {
|
||||
fun t(): T
|
||||
}
|
||||
|
||||
trait Super {
|
||||
fun foo(p: Rec<*, *>) = p.t()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import a.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val declaredMethod = javaClass<Super>().getDeclaredMethod("foo", javaClass<Rec<*, *>>())
|
||||
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()
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
trait Rec<R, out T: Rec<R, T>> {
|
||||
fun t(): T
|
||||
}
|
||||
|
||||
trait Super {
|
||||
fun foo(p: Rec<*, *>) = p.t()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
internal trait Rec</*0*/ R, /*1*/ out T : test.Rec<R, T>> {
|
||||
internal abstract fun t(): T
|
||||
}
|
||||
|
||||
internal trait Super {
|
||||
internal open fun foo(/*0*/ p: test.Rec<*, *>): test.Rec<*, *>
|
||||
}
|
||||
Reference in New Issue
Block a user