KT-1191 Wrong detection of unused parameters

KT-1219 Incorrect 'unused value' error in closures
This commit is contained in:
Svetlana Isakova
2012-02-22 17:07:49 +04:00
parent 7f2a8100c4
commit cc244fad94
12 changed files with 94 additions and 22 deletions
@@ -23,7 +23,7 @@ fun foo() {
2
}
else {
z = <!UNUSED_VALUE!>34<!>
z = 34
}
}
val <!UNUSED_VARIABLE!>f<!>: ()-> Int = <!TYPE_MISMATCH!>r<!>
@@ -74,7 +74,7 @@ fun testCoercionToUnit() {
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>x<!> = 43
val checkType = {
if (true) {
x = <!UNUSED_VALUE!>4<!>
x = 4
} else {
45
}