mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Minor, add reflection test on inherited Java property
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
public class J {
|
||||
public String result = null;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
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