Files
kotlin-fork/idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt
T
Alexander Udalov 146498ec32 Sort out renderers for diagnostics
- change NAMED to be Renderer<Named> and render Named's name. It was used in
  multiple places with arbitrary arguments, not only Named: change renderers in
  those places to TO_STRING
- add STRING, which is Renderer<String> and renders string itself. Change all
  places where strings were used with either TO_STRING or NAMED to STRING
- change NOT_AN_ANNOTATION_CLASS diagnostic to be reported on descriptor, not
  any string
- change "unused variable/parameter" diagnostics to be reported on
  VariableDescriptor, not Object
2014-04-17 19:51:31 +04:00

8 lines
123 B
Kotlin

// !DIAGNOSTICS_NUMBER: 1
// !DIAGNOSTICS: ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE
fun foo() {
var x = "a"
x = "b"
}