mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
10 lines
203 B
Kotlin
10 lines
203 B
Kotlin
class A(val x: Int)
|
|
|
|
fun box(): String {
|
|
val p = A::x
|
|
if (p.get(A(42)) != 42) return "Fail 1"
|
|
if (p.get(A(-1)) != -1) return "Fail 2"
|
|
if (p.name != "x") return "Fail 3"
|
|
return "OK"
|
|
}
|