Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt610.jet
T
Stepan Koltsov 07ff53d456 add trailing newlines to test files
otherwise I have to rollback dozens of files after using sed that follows conventions
2012-03-12 22:54:14 +04:00

11 lines
338 B
Plaintext

//KT-610 Distinguish errors 'unused variable' and 'variable is assigned but never accessed'
package 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<!>
}