Files
kotlin/compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt
2016-07-22 11:05:19 +03:00

14 lines
198 B
Kotlin
Vendored

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