Provide diagnostic for typealias using deprecated class or constructor
#KT-19205 Fixed Target versions 1.1.5
This commit is contained in:
@@ -10,8 +10,8 @@ typealias DeprecatedClassAlias = <!DEPRECATION!>DeprecatedClass<!>
|
||||
typealias WithDeprecatedCtorAlias = WithDeprecatedCtor
|
||||
typealias ArrayListOfDeprecatedClass = ArrayList<<!DEPRECATION!>DeprecatedClass<!>>
|
||||
|
||||
class Test1 : <!DEPRECATION!>DeprecatedClassAlias<!>()
|
||||
class Test1 : <!TYPEALIAS_EXPANSION_DEPRECATION!>DeprecatedClassAlias<!>()
|
||||
|
||||
class Test2 : <!DEPRECATION!>WithDeprecatedCtorAlias<!>()
|
||||
class Test2 : <!TYPEALIAS_EXPANSION_DEPRECATION!>WithDeprecatedCtorAlias<!>()
|
||||
|
||||
val test3 = <!DEPRECATION!>ArrayListOfDeprecatedClass<!>()
|
||||
val test3 = <!TYPEALIAS_EXPANSION_DEPRECATION!>ArrayListOfDeprecatedClass<!>()
|
||||
+15
-4
@@ -1,10 +1,21 @@
|
||||
@Deprecated("")
|
||||
class Foo
|
||||
|
||||
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||
class Err
|
||||
|
||||
typealias Test1 = <!DEPRECATION!>Foo<!>
|
||||
typealias Test2 = List<<!DEPRECATION!>Foo<!>>
|
||||
typealias Test3 = List<<!DEPRECATION!>Test2<!>>
|
||||
typealias Test3 = List<<!TYPEALIAS_EXPANSION_DEPRECATION!>Test2<!>>
|
||||
|
||||
fun use1(b: <!DEPRECATION!>Test1<!>) = b
|
||||
fun use2(b: <!DEPRECATION!>Test2<!>) = b
|
||||
fun use3(b: <!DEPRECATION!>Test3<!>) = b
|
||||
typealias TestErr1 = <!DEPRECATION_ERROR!>Err<!>
|
||||
typealias TestErr2 = List<<!DEPRECATION_ERROR!>Err<!>>
|
||||
typealias TestErr3 = List<<!TYPEALIAS_EXPANSION_DEPRECATION_ERROR!>TestErr2<!>>
|
||||
|
||||
fun use1(b: <!TYPEALIAS_EXPANSION_DEPRECATION!>Test1<!>) = b
|
||||
fun use2(b: <!TYPEALIAS_EXPANSION_DEPRECATION!>Test2<!>) = b
|
||||
fun use3(b: <!TYPEALIAS_EXPANSION_DEPRECATION!>Test3<!>) = b
|
||||
|
||||
fun useErr1(b: <!TYPEALIAS_EXPANSION_DEPRECATION_ERROR!>TestErr1<!>) = b
|
||||
fun useErr2(b: <!TYPEALIAS_EXPANSION_DEPRECATION_ERROR!>TestErr2<!>) = b
|
||||
fun useErr3(b: <!TYPEALIAS_EXPANSION_DEPRECATION_ERROR!>TestErr3<!>) = b
|
||||
+13
@@ -3,6 +3,16 @@ package
|
||||
public fun use1(/*0*/ b: Test1 /* = Foo */): Test1 /* = Foo */
|
||||
public fun use2(/*0*/ b: Test2 /* = kotlin.collections.List<Foo> */): Test2 /* = kotlin.collections.List<Foo> */
|
||||
public fun use3(/*0*/ b: Test3 /* = kotlin.collections.List<Test2 /* = kotlin.collections.List<Foo> */> */): Test3 /* = kotlin.collections.List<Test2 /* = kotlin.collections.List<Foo> */> */
|
||||
public fun useErr1(/*0*/ b: TestErr1 /* = Err */): TestErr1 /* = Err */
|
||||
public fun useErr2(/*0*/ b: TestErr2 /* = kotlin.collections.List<Err> */): TestErr2 /* = kotlin.collections.List<Err> */
|
||||
public fun useErr3(/*0*/ b: TestErr3 /* = kotlin.collections.List<TestErr2 /* = kotlin.collections.List<Err> */> */): TestErr3 /* = kotlin.collections.List<TestErr2 /* = kotlin.collections.List<Err> */> */
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "") public final class Err {
|
||||
public constructor Err()
|
||||
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
|
||||
}
|
||||
|
||||
@kotlin.Deprecated(message = "") public final class Foo {
|
||||
public constructor Foo()
|
||||
@@ -13,3 +23,6 @@ public fun use3(/*0*/ b: Test3 /* = kotlin.collections.List<Test2 /* = kotlin.co
|
||||
public typealias Test1 = Foo
|
||||
public typealias Test2 = kotlin.collections.List<Foo>
|
||||
public typealias Test3 = kotlin.collections.List<Test2>
|
||||
public typealias TestErr1 = Err
|
||||
public typealias TestErr2 = kotlin.collections.List<Err>
|
||||
public typealias TestErr3 = kotlin.collections.List<TestErr2>
|
||||
|
||||
Reference in New Issue
Block a user