mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
17 lines
294 B
Kotlin
Vendored
17 lines
294 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS
|
|
|
|
enum class E {
|
|
A, B;
|
|
|
|
fun foo() = this.name
|
|
}
|
|
|
|
fun box(): String {
|
|
val f = E.A::foo
|
|
if (f() != "A") return "Fail 1: ${f()}"
|
|
if (f != E.B::foo) return "Fail 2"
|
|
|
|
return "OK"
|
|
}
|