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
This commit is contained in:
Alexander Udalov
2014-04-15 21:30:51 +04:00
parent 4c973b79ee
commit 146498ec32
12 changed files with 92 additions and 51 deletions
@@ -0,0 +1,6 @@
// !DIAGNOSTICS_NUMBER: 1
// !DIAGNOSTICS: UNUSED_VARIABLE
fun foo() {
val x = 42
}