Support deprecation level HIDDEN for classifiers

Classifiers annotated with `@Deprecated(level = HIDDEN)` now have smaller
priority in imports, similarly to private classes. For example, if two
classifiers named Foo are imported with a star import and one of them is
deprecated-hidden, the name Foo in the source code is resolved to the other
one.

Also a minor change in multi-module diagnostic tests: do not append newlines
after the last module in the test

 #KT-13926 Fixed
This commit is contained in:
Alexander Udalov
2016-09-21 10:49:19 +03:00
parent 83c86d06ed
commit aaeae8b948
10 changed files with 271 additions and 5 deletions
@@ -0,0 +1,11 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
@Deprecated("", level = DeprecationLevel.HIDDEN)
open class Foo
fun test(f: <!DEPRECATION_ERROR!>Foo<!>) {
f.toString()
val g: <!DEPRECATION_ERROR!>Foo<!>? = <!UNRESOLVED_REFERENCE!>Foo<!>()
}
class Bar : <!UNRESOLVED_REFERENCE, DEPRECATION_ERROR, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>Foo<!>()