@@ -2518,6 +2518,11 @@ task inline_defaultArgs(type: RunKonanTest) {
|
||||
source = "codegen/inline/defaultArgs.kt"
|
||||
}
|
||||
|
||||
task classDeclarationInsideInline(type: RunKonanTest) {
|
||||
source = "codegen/inline/classDeclarationInsideInline.kt"
|
||||
goldValue = "test1: 1.0\n1\ntest2\n"
|
||||
}
|
||||
|
||||
task deserialized_inline0(type: RunKonanTest) {
|
||||
source = "serialization/deserialized_inline0.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package codegen.inline.classDeclarationInsideInline
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun f() {
|
||||
run {
|
||||
class Test1<T : Number, G>(val x: T, val y: G) {
|
||||
override fun toString() = "test1: ${x.toDouble()}"
|
||||
}
|
||||
|
||||
class Test2<X>(val a: Test1<Int, X>) {
|
||||
override fun toString() = "test2"
|
||||
}
|
||||
|
||||
val v = Test2(Test1(1, Test2(Test1(1, 3))))
|
||||
println(v.a)
|
||||
println(v.a.x)
|
||||
println(v.a.y)
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun test() {
|
||||
f()
|
||||
}
|
||||
Reference in New Issue
Block a user