[FIR] Report deprecations on deprecated super constructor calls
#KT-57350 Fixed
This commit is contained in:
committed by
Space Team
parent
b253a3a47e
commit
206fad4256
@@ -22,10 +22,12 @@ public class B extends A {
|
||||
}
|
||||
|
||||
// FILE: C.kt
|
||||
class C @Deprecated("") constructor(s: String) {
|
||||
open class C @Deprecated("") constructor(s: String) {
|
||||
}
|
||||
|
||||
// FILE: use.kt
|
||||
class D : <!DEPRECATION!>C<!>("")
|
||||
|
||||
fun use(a: A, b: B, c: C) {
|
||||
<!DEPRECATION!>A<!>(3)
|
||||
A("")
|
||||
|
||||
@@ -18,9 +18,17 @@ public open class B : A {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class C {
|
||||
public open class C {
|
||||
@kotlin.Deprecated(message = "") public constructor C(/*0*/ s: kotlin.String)
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class D : C {
|
||||
public constructor D()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_PARAMETER
|
||||
|
||||
open class C<T>() {
|
||||
@Deprecated("")
|
||||
constructor(p: Int) : this(){}
|
||||
}
|
||||
|
||||
class D : C<String>(1)
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_PARAMETER
|
||||
|
||||
open class C<T>() {
|
||||
|
||||
@@ -12,6 +12,6 @@ typealias ArrayListOfDeprecatedClass = ArrayList<<!DEPRECATION!>DeprecatedClass<
|
||||
|
||||
class Test1 : DeprecatedClassAlias()
|
||||
|
||||
class Test2 : WithDeprecatedCtorAlias()
|
||||
class Test2 : <!DEPRECATION!>WithDeprecatedCtorAlias<!>()
|
||||
|
||||
val test3 = ArrayListOfDeprecatedClass()
|
||||
|
||||
Reference in New Issue
Block a user