Add test for UNUSED_VALUE on when subject variable

This commit is contained in:
Dmitry Petrov
2017-10-20 18:09:19 +03:00
parent c20c1abb68
commit 0a0bc67e8a
4 changed files with 24 additions and 0 deletions
@@ -0,0 +1,8 @@
// !LANGUAGE: +VariableDeclarationInWhenSubject
fun foo(): Any = 42
fun test() {
when (val <!UNUSED_VARIABLE!>x<!> = foo()) {
}
}
@@ -0,0 +1,4 @@
package
public fun foo(): kotlin.Any
public fun test(): kotlin.Unit