Extra tests for when with val in subject

This commit is contained in:
Dmitry Petrov
2018-06-07 10:37:00 +03:00
parent c691d64ea8
commit 758548603e
4 changed files with 63 additions and 10 deletions
@@ -3,7 +3,7 @@
fun foo(): Any = 42
fun test(x: Any) {
fun test1(x: Any) {
when (val y = foo()) {
is String -> <!VAL_REASSIGNMENT!>y<!> = ""
}