Move ClassifierUsageChecker invocation lower in LazyTopDownAnalyzer
Invoking checkers right after resolution of qualified expressions is too early: DeprecatedClassifierUsageChecker tries to load the annotations of a referenced classifier to report deprecation, and that may result in building light classes for not yet analyzed declarations #KT-13954 Fixed
This commit is contained in:
@@ -17,4 +17,16 @@ fun useCompanion() {
|
||||
val <!UNUSED_VARIABLE!>x<!> = Another.<!DEPRECATION!>Companion<!>
|
||||
Another.<!DEPRECATION!>Companion<!>.use()
|
||||
<!DEPRECATION!>Another<!>.use()
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Some")
|
||||
class Some {
|
||||
companion object {
|
||||
fun use() {}
|
||||
}
|
||||
}
|
||||
|
||||
fun some() {
|
||||
<!DEPRECATION!>Some<!>.use()
|
||||
<!DEPRECATION!>Some<!>.Companion.use()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user