Change Signature: Add support of type parameter substitutions in overriding members

This commit is contained in:
Alexey Sedunov
2014-12-02 14:02:15 +03:00
parent 250940c824
commit c917459926
29 changed files with 638 additions and 131 deletions
@@ -0,0 +1,23 @@
class U<A>
trait T<A, B> {
fun foofoofoo<C>(a: List<C>, b: A?, c: U<B>): U<C>?
}
abstract class T1<X, Y> : T<U<X>, U<Y>> {
override fun <C> foofoofoo(a: List<C>, b: U<X>?, c: U<U<Y>>): U<C>? {
throw UnsupportedOperationException()
}
}
abstract class T2<X> : T1<X, String>() {
override fun <C> foofoofoo(a: List<C>, b: U<X>?, c: U<U<String>>): U<C>? {
throw UnsupportedOperationException()
}
}
class T3 : T2<Any>() {
override fun foofoofoo<D>(a: List<D>, b: U<Any>?, c: U<U<String>>): U<D>? {
throw UnsupportedOperationException()
}
}