Add tests for obsolete codegen issues
#KT-16790 Obsolete #KT-16858 Obsolete #KT-17441 Obsolete
This commit is contained in:
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
open class A(val a: String, val b: Int)
|
||||
|
||||
fun box(): String {
|
||||
val o = object : A(b = 2, a = "OK") {}
|
||||
return o.a
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
|
||||
fun WithCompanion.test(): String {
|
||||
object : WithCompanion(this) {}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
open class WithCompanion(a: WithCompanion.Companion) {
|
||||
companion object
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return WithCompanion(WithCompanion.Companion).test()
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// SKIP_JDK6
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.function.Supplier
|
||||
|
||||
open class Base(val supplier: Supplier<Number>)
|
||||
|
||||
object Extended : Base(Supplier { 32 })
|
||||
|
||||
fun box(): String {
|
||||
val blam = Extended
|
||||
return if (blam.supplier.get() == 32) "OK" else "Fail"
|
||||
}
|
||||
Reference in New Issue
Block a user