mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
29 lines
408 B
Kotlin
Vendored
29 lines
408 B
Kotlin
Vendored
// FILE: test/En.java
|
|
|
|
package test;
|
|
|
|
import java.lang.Override;
|
|
import java.lang.String;
|
|
|
|
public enum En {
|
|
A {
|
|
@Override
|
|
public String repr() {
|
|
return "A";
|
|
}
|
|
},
|
|
B;
|
|
|
|
public String repr() {
|
|
return "ololol" + toString();
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
import test.En.*
|
|
|
|
fun box() =
|
|
if (A.repr() == "A" && B.repr() == "olololB") "OK"
|
|
else "fail"
|