Deprecate escaped modifiers and unescaped annotations
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
annotation class obsolete()
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
annotation class obsoleteWithParam(val text: String)
|
||||
|
||||
<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsolete<!> class Obsolete
|
||||
@<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsolete<!> class Obsolete
|
||||
|
||||
<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsoleteWithParam<!>("text") class Obsolete2
|
||||
@<!DEPRECATED_SYMBOL_WITH_MESSAGE!>obsoleteWithParam<!>("text") class Obsolete2
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
class Data {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun component1(): String = throw Exception()
|
||||
fun component2(): String = throw Exception()
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ class UsefulClass(val param: Int = 2) {
|
||||
fun get(instance: Any, property: PropertyMetadata) : Int = 1
|
||||
fun set(instance: Any, property: PropertyMetadata, value: Int) {}
|
||||
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun member() {}
|
||||
}
|
||||
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun Obsolete(param: Int = 1): UsefulClass = UsefulClass(param)
|
||||
|
||||
class Invocable {
|
||||
Deprecated("message")
|
||||
@Deprecated("message")
|
||||
fun invoke() {}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class Initializer {
|
||||
val x = <!DEPRECATED_SYMBOL_WITH_MESSAGE!>Obsolete<!>()
|
||||
}
|
||||
|
||||
Deprecated("does nothing good")
|
||||
@Deprecated("does nothing good")
|
||||
fun Any.doNothing() = this.toString() // "this" should not be marked as deprecated despite it referes to deprecated function
|
||||
|
||||
class Delegation {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -UNUSED_PARAMETER
|
||||
|
||||
open class C<T>() {
|
||||
Deprecated("")
|
||||
@Deprecated("")
|
||||
constructor(p: Int) : this(){}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import <!DEPRECATED_SYMBOL_WITH_MESSAGE!>C<!> as C2
|
||||
|
||||
Deprecated("obsolete")
|
||||
@Deprecated("obsolete")
|
||||
class C {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Iter {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun iterator() : IterIterator = throw Exception()
|
||||
|
||||
class IterIterator {
|
||||
@@ -11,9 +11,9 @@ class Iter {
|
||||
class Iter2 {
|
||||
fun iterator() : Iter2Iterator = throw Exception()
|
||||
class Iter2Iterator {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun hasNext(): Boolean = throw UnsupportedOperationException()
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun next(): String = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class TopLevel {
|
||||
Deprecated("Nested")
|
||||
@Deprecated("Nested")
|
||||
class Nested {
|
||||
companion object {
|
||||
fun use() {}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Deprecated("Object")
|
||||
@Deprecated("Object")
|
||||
object Obsolete {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
class Another {
|
||||
Deprecated("Object")
|
||||
@Deprecated("Object")
|
||||
companion object {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
class Delegate() {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun get(instance: Any, property: PropertyMetadata) : Int = 1
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
fun set(instance: Any, property: PropertyMetadata, value: Int) {}
|
||||
}
|
||||
|
||||
class PropertyHolder {
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
val x = 1
|
||||
|
||||
Deprecated("text")
|
||||
@Deprecated("text")
|
||||
var name = "String"
|
||||
|
||||
val valDelegate <!DEPRECATED_SYMBOL_WITH_MESSAGE!>by<!> Delegate()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
class PropertyHolder {
|
||||
Deprecated("")
|
||||
@Deprecated("")
|
||||
val a1 = 1
|
||||
|
||||
@property:Deprecated("")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Deprecated("Class")
|
||||
@Deprecated("Class")
|
||||
open class Obsolete {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
Deprecated("Class")
|
||||
open class Obsolete2 Deprecated("Constructor") constructor() {
|
||||
@Deprecated("Class")
|
||||
open class Obsolete2 @Deprecated("Constructor") constructor() {
|
||||
fun use() {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user