Minor, add test on bound reference to enum entry member
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user