Files
kotlin/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt
2016-11-09 21:41:12 +03:00

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"
}