Files
kotlin-fork/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor2.kt
T
2021-06-17 13:24:12 +03:00

20 lines
287 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_STDLIB
// MODULE: lib
// FILE: A.kt
abstract class Foo<T : Number>(@JvmField val foo: T)
class Bar(foo: Int) : Foo<Int>(foo) {
fun test(): Int = foo + 1
}
// MODULE: main(lib)
// FILE: B.kt
fun box(): String {
Bar(41).test()
return "OK"
}