mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Currently all tests in boxWithStdlib/ run with both runtime and reflection included; eventually they'll be merged into box/ using these directives
20 lines
300 B
Kotlin
Vendored
20 lines
300 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// FILE: Test.java
|
|
|
|
public class Test {
|
|
public static String invokeMethodWithPublicField() {
|
|
C c = new C("OK");
|
|
return c.foo;
|
|
}
|
|
}
|
|
|
|
// FILE: simple.kt
|
|
|
|
class C(@JvmField val foo: String) {
|
|
|
|
}
|
|
|
|
fun box(): String {
|
|
return Test.invokeMethodWithPublicField()
|
|
}
|