FIR: Change diagnostic for ConeHiddenCandidate to UNRESOLVED_REFERENCE.
The KDoc for @Deprecated states that DeprecationLevel.HIDDEN usages should look like unresolved references.
This commit is contained in:
committed by
TeamCityServer
parent
7425986bf0
commit
b8ed46066e
+1
-1
@@ -115,7 +115,7 @@ fun use(
|
||||
) {
|
||||
wd.<!DEPRECATION!>f<!>()
|
||||
ed.<!DEPRECATION_ERROR!>f<!>()
|
||||
hd.<!INVISIBLE_REFERENCE!>f<!>()
|
||||
hd.<!UNRESOLVED_REFERENCE!>f<!>()
|
||||
|
||||
we.f()
|
||||
wh.f()
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ fun use(
|
||||
) {
|
||||
wd.<!DEPRECATION!>f<!>()
|
||||
ed.<!DEPRECATION_ERROR!>f<!>()
|
||||
hd.<!INVISIBLE_REFERENCE!>f<!>()
|
||||
hd.<!UNRESOLVED_REFERENCE!>f<!>()
|
||||
|
||||
we.f()
|
||||
wh.f()
|
||||
|
||||
+3
-3
@@ -107,8 +107,8 @@ fun use(
|
||||
setterDeprecated.p
|
||||
setterDeprecated.p <!DEPRECATION!>=<!> 1
|
||||
|
||||
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!>
|
||||
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!>
|
||||
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!> = 1
|
||||
|
||||
wd.p
|
||||
wd.p = 1
|
||||
@@ -132,5 +132,5 @@ fun use(
|
||||
ned.p = 1
|
||||
|
||||
diff.<!DEPRECATION_ERROR!>p<!>
|
||||
diff.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||
diff.<!UNRESOLVED_REFERENCE!>p<!> = 1
|
||||
}
|
||||
|
||||
+3
-3
@@ -107,8 +107,8 @@ fun use(
|
||||
setterDeprecated.p
|
||||
setterDeprecated.p <!DEPRECATION!>=<!> 1
|
||||
|
||||
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!>
|
||||
hiddenDeprecated.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!>
|
||||
hiddenDeprecated.<!UNRESOLVED_REFERENCE!>p<!> = 1
|
||||
|
||||
wd.p
|
||||
wd.p = 1
|
||||
@@ -132,5 +132,5 @@ fun use(
|
||||
ned.p = 1
|
||||
|
||||
diff.<!DEPRECATION_ERROR!>p<!>
|
||||
diff.<!INVISIBLE_REFERENCE!>p<!> = 1
|
||||
diff.<!UNRESOLVED_REFERENCE!>p<!> = 1
|
||||
}
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
// !API_VERSION: 1.4
|
||||
|
||||
package kotlin
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.4")
|
||||
class ClassCur
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.4")
|
||||
fun funCur() {}
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.4")
|
||||
val valCur = Unit
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.5")
|
||||
class ClassNext
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.5")
|
||||
fun funNext() {}
|
||||
|
||||
@Deprecated("")
|
||||
@DeprecatedSinceKotlin(hiddenSince = "1.5")
|
||||
val valNext = Unit
|
||||
|
||||
fun usage() {
|
||||
<!DEPRECATION_ERROR!>ClassCur<!>()
|
||||
<!INVISIBLE_REFERENCE!>funCur<!>()
|
||||
<!INVISIBLE_REFERENCE!>valCur<!>
|
||||
|
||||
ClassNext()
|
||||
funNext()
|
||||
valNext
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !API_VERSION: 1.4
|
||||
|
||||
package kotlin
|
||||
|
||||
+8
-8
@@ -27,14 +27,14 @@ var v6: String
|
||||
set(value) {}
|
||||
|
||||
fun test() {
|
||||
<!INVISIBLE_REFERENCE!>v1<!>
|
||||
<!INVISIBLE_REFERENCE!>v2<!>
|
||||
<!INVISIBLE_REFERENCE!>v3<!>
|
||||
<!UNRESOLVED_REFERENCE!>v1<!>
|
||||
<!UNRESOLVED_REFERENCE!>v2<!>
|
||||
<!UNRESOLVED_REFERENCE!>v3<!>
|
||||
v3 = ""
|
||||
v4
|
||||
<!INVISIBLE_REFERENCE!>v4<!> = ""
|
||||
<!INVISIBLE_REFERENCE!>v5<!>
|
||||
<!INVISIBLE_REFERENCE!>v5<!> = ""
|
||||
<!INVISIBLE_REFERENCE!>v6<!>
|
||||
<!INVISIBLE_REFERENCE!>v6<!> = ""
|
||||
<!UNRESOLVED_REFERENCE!>v4<!> = ""
|
||||
<!UNRESOLVED_REFERENCE!>v5<!>
|
||||
<!UNRESOLVED_REFERENCE!>v5<!> = ""
|
||||
<!UNRESOLVED_REFERENCE!>v6<!>
|
||||
<!UNRESOLVED_REFERENCE!>v6<!> = ""
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ object A {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
takeString(<!ARGUMENT_TYPE_MISMATCH!>A <!INVISIBLE_REFERENCE!>%<!> 123<!>)
|
||||
takeString(<!ARGUMENT_TYPE_MISMATCH!>A <!UNRESOLVED_REFERENCE!>%<!> 123<!>)
|
||||
}
|
||||
|
||||
fun takeString(s: String) {}
|
||||
fun takeString(s: String) {}
|
||||
|
||||
@@ -38,23 +38,23 @@ open class A {
|
||||
val String.memberExtensionProperty: Int get() = 1
|
||||
|
||||
fun foo() {
|
||||
<!INVISIBLE_REFERENCE!>topLevelFun<!>()
|
||||
<!INVISIBLE_REFERENCE!>topLevelFun<!>(1)
|
||||
<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>topLevelProperty<!>++
|
||||
"".<!INVISIBLE_REFERENCE!>topLevelExtensionFun<!>()
|
||||
1.<!INVISIBLE_REFERENCE!>topLevelExtensionFun<!>()
|
||||
"".<!INVISIBLE_REFERENCE!>topLevelExtensionProperty<!>
|
||||
1.<!INVISIBLE_REFERENCE!>topLevelExtensionProperty<!>
|
||||
<!UNRESOLVED_REFERENCE!>topLevelFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>topLevelFun<!>(1)
|
||||
<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>topLevelProperty<!>++
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionFun<!>()
|
||||
1.<!UNRESOLVED_REFERENCE!>topLevelExtensionFun<!>()
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionProperty<!>
|
||||
1.<!UNRESOLVED_REFERENCE!>topLevelExtensionProperty<!>
|
||||
|
||||
<!INVISIBLE_REFERENCE!>memberFun<!>()
|
||||
<!INVISIBLE_REFERENCE!>memberFun<!>(1)
|
||||
<!INVISIBLE_REFERENCE!>privateFun<!>()
|
||||
<!INVISIBLE_REFERENCE!>privateFun<!>(1)
|
||||
<!INVISIBLE_REFERENCE!>memberProperty<!>
|
||||
"".<!INVISIBLE_REFERENCE!>memberExtensionFun<!>()
|
||||
1.<!INVISIBLE_REFERENCE!>memberExtensionFun<!>()
|
||||
"".<!INVISIBLE_REFERENCE!>memberExtensionProperty<!>
|
||||
1.<!INVISIBLE_REFERENCE!>memberExtensionProperty<!>
|
||||
<!UNRESOLVED_REFERENCE!>memberFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>memberFun<!>(1)
|
||||
<!UNRESOLVED_REFERENCE!>privateFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>privateFun<!>(1)
|
||||
<!UNRESOLVED_REFERENCE!>memberProperty<!>
|
||||
"".<!UNRESOLVED_REFERENCE!>memberExtensionFun<!>()
|
||||
1.<!UNRESOLVED_REFERENCE!>memberExtensionFun<!>()
|
||||
"".<!UNRESOLVED_REFERENCE!>memberExtensionProperty<!>
|
||||
1.<!UNRESOLVED_REFERENCE!>memberExtensionProperty<!>
|
||||
|
||||
A(<!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
@@ -76,9 +76,9 @@ interface I {
|
||||
class B : A(<!ARGUMENT_TYPE_MISMATCH!>""<!>) {
|
||||
// still can override it
|
||||
override fun <!OVERRIDE_DEPRECATION!>memberFun<!>() {
|
||||
super.<!INVISIBLE_REFERENCE!>memberFun<!>() // but cannot call super :)
|
||||
<!INVISIBLE_REFERENCE!>privateFun<!>()
|
||||
<!INVISIBLE_REFERENCE!>privateFun<!>(1)
|
||||
super.<!UNRESOLVED_REFERENCE!>memberFun<!>() // but cannot call super :)
|
||||
<!UNRESOLVED_REFERENCE!>privateFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>privateFun<!>(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user