KT-351 Distinguish statement and expression positions
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
//KT-610 Distinguish errors 'unused variable' and 'variable is assigned but never accessed'
|
||||
|
||||
namespace kt610
|
||||
|
||||
fun foo() {
|
||||
var <!UNUSED_VARIABLE!>j<!> = 9 //'unused variable' error
|
||||
|
||||
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>i<!> = 1 //should be an error 'variable i is assigned but never accessed'
|
||||
i = <!UNUSED_VALUE!>2<!>
|
||||
}
|
||||
Reference in New Issue
Block a user