mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
17
compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin.kt
vendored
Normal file
17
compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin.kt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// FILE: J.java
|
||||
|
||||
public class J {
|
||||
public String result = null;
|
||||
}
|
||||
|
||||
// FILE: K.kt
|
||||
|
||||
class K : J()
|
||||
|
||||
fun box(): String {
|
||||
val k = K()
|
||||
val p = K::result
|
||||
if (p.get(k) != null) return "Fail"
|
||||
p.set(k, "OK")
|
||||
return p.get(k)
|
||||
}
|
||||
Reference in New Issue
Block a user