support property access in pattern matching expressions

This commit is contained in:
Dmitry Jemerov
2011-07-06 20:17:38 +02:00
parent 8d28105a9e
commit d42eedb0e0
3 changed files with 23 additions and 0 deletions
@@ -0,0 +1,9 @@
class C(val p: Boolean) { }
fun box(): String {
val c = C(true)
return when(c) {
.p => "OK"
else => "fail"
}
}