mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
21 lines
386 B
Kotlin
Vendored
21 lines
386 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: JavaClass.java
|
|
|
|
class JavaClass {
|
|
JavaClass(Runnable r) {
|
|
if (r != null) r.run();
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
var status: String = "fail" // global property to avoid issues with accessing closure from local class (KT-4174)
|
|
|
|
internal class KotlinClass(): JavaClass({status="OK"}) {
|
|
}
|
|
|
|
fun box(): String {
|
|
KotlinClass()
|
|
return status
|
|
}
|