Minor, add test on bound reference to enum entry member

This commit is contained in:
Alexander Udalov
2016-07-21 19:56:23 +03:00
parent 9ab8da2ef9
commit 0dd71cc0c0
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,13 @@
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"
}