e6f4d6e6fa
^KT-65406
48 lines
676 B
Kotlin
Vendored
48 lines
676 B
Kotlin
Vendored
class Inv<T : Any?> {
|
|
val x: T
|
|
field = x
|
|
get
|
|
|
|
constructor(x: T) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class Test_1<TT : Any?> : JavaClass1<TT> {
|
|
val x: TT
|
|
field = x
|
|
get
|
|
|
|
constructor(x: TT) /* primary */ {
|
|
super/*JavaClass1*/<TT>()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
fun test(b: B<TT>) {
|
|
b.output(x = <this>.<get-x>())
|
|
}
|
|
|
|
}
|
|
|
|
class Test_2<TT : Any?> : JavaClass2<TT, Inv<TT>> {
|
|
constructor() /* primary */ {
|
|
super/*JavaClass2*/<TT, Inv<TT>>()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
fun process(b: B<TT, Inv<TT>>) {
|
|
b.output(output = Inv<TT>(x = b.element()))
|
|
}
|
|
|
|
}
|
|
|
|
fun <R : Any?> test_3(jb: B<R>, r: R) {
|
|
jb.output(x = r)
|
|
}
|
|
|