mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
15
compiler/testData/codegen/boxWithJava/reflection/referenceToJavaFieldOfKotlinSubclass.kt
vendored
Normal file
15
compiler/testData/codegen/boxWithJava/reflection/referenceToJavaFieldOfKotlinSubclass.kt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// FILE: J.java
|
||||
|
||||
public class J extends K {
|
||||
public final int value = 42;
|
||||
}
|
||||
|
||||
// FILE: K.kt
|
||||
|
||||
open class K
|
||||
|
||||
fun box(): String {
|
||||
val f = J::value
|
||||
val a = J()
|
||||
return if (f.get(a) == 42) "OK" else "Fail: ${f.get(a)}"
|
||||
}
|
||||
Reference in New Issue
Block a user