KT-351 Distinguish statement and expression positions

This commit is contained in:
svtk
2011-12-13 19:43:20 +04:00
parent 182009ab61
commit a41d33a56c
19 changed files with 318 additions and 65 deletions
@@ -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<!>
}