401f0ac583
"// TARGET_BACKEND: JVM" more clearly says that the test is JVM-specific, rather than DONT_TARGET_EXACT_BACKEND which excludes all other backends.
24 lines
493 B
Kotlin
Vendored
24 lines
493 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// MODULE: lib
|
|
// FILE: JavaClass2.java
|
|
|
|
class JavaClass1 {
|
|
protected Object value = null;
|
|
|
|
public Object getSomething() { return null; }
|
|
public void setSomething(Object value) { this.value = value; }
|
|
}
|
|
|
|
class JavaClass2 extends JavaClass1 {
|
|
public String getSomething() { return (String)value; }
|
|
}
|
|
|
|
// MODULE: main(lib)
|
|
// FILE: 1.kt
|
|
|
|
fun box(): String {
|
|
val javaClass = JavaClass2()
|
|
javaClass.something = "OK"
|
|
return javaClass.something
|
|
}
|