JVM IR: (Un)mute tests and add more tests for bridge generation
This commit is contained in:
committed by
Georgy Bronnikov
parent
12e31a1760
commit
5f6af58aeb
+24
@@ -0,0 +1,24 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline class A(val s: String)
|
||||
|
||||
abstract class B<T, U> {
|
||||
abstract fun f(x: T, y: U): String
|
||||
}
|
||||
|
||||
open class C<T>: B<T, A>() {
|
||||
override fun f(x: T, y: A): String = y.s + " 1"
|
||||
}
|
||||
|
||||
open class D : C<A>() {
|
||||
override fun f(x: A, y: A): String = y.s + " 2"
|
||||
}
|
||||
|
||||
class E : D() {
|
||||
override fun f(x: A, y: A): String = x.s
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return E().f(A("OK"), A("Fail"))
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline class A(val s: String)
|
||||
|
||||
interface B<T, U> {
|
||||
fun f(x: T, y: U): String
|
||||
}
|
||||
|
||||
interface L<T> {
|
||||
fun f(x: T, y: A): String
|
||||
}
|
||||
|
||||
interface R<T> {
|
||||
fun f(x: A, y: T): String
|
||||
}
|
||||
|
||||
open class C {
|
||||
open fun f(x: A, y: A): String = y.s
|
||||
}
|
||||
|
||||
class D: C(), B<A, A>, L<A>, R<A> {
|
||||
override fun f(x: A, y: A): String = x.s
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return (D() as B<A, A>).f(A("OK"), A("Fail"))
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline class A(val s: String)
|
||||
|
||||
interface B<T> {
|
||||
fun f(x: T): T
|
||||
}
|
||||
|
||||
open class C {
|
||||
open fun f(x: A): A = A("OK")
|
||||
}
|
||||
|
||||
class D : C(), B<A>
|
||||
|
||||
fun box(): String {
|
||||
return (D() as B<A>).f(A("Fail")).s
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline class A(val s: String)
|
||||
|
||||
abstract class B<T> {
|
||||
abstract fun f(x: T): T
|
||||
}
|
||||
|
||||
class C: B<A>() {
|
||||
override fun f(x: A): A = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return C().f(A("OK")).s
|
||||
}
|
||||
Reference in New Issue
Block a user