Deprecate deprecated in favor of Deprecated

This commit is contained in:
Denis Zharkov
2015-09-01 19:59:19 +03:00
parent 952d45dc8b
commit 31244edec9
444 changed files with 686 additions and 688 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttribu
}
<info textAttributesKey="KOTLIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info>
<info textAttributesKey="KOTLIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">deprecated</info>
<info textAttributesKey="KOTLIN_ANNOTATION">annotation</info> class <info textAttributesKey="KOTLIN_ANNOTATION">Deprecated</info>
<info textAttributesKey="KOTLIN_ANNOTATION">@deprecated</info>
<info textAttributesKey="KOTLIN_ANNOTATION">@Deprecated</info>
<info textAttributesKey="KOTLIN_ANNOTATION">magnificent</info> <info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">abstract</info> class <info textAttributesKey="KOTLIN_ABSTRACT_CLASS">AbstractClass</info><<info textAttributesKey="KOTLIN_TYPE_PARAMETER">T</info>> {
}
+1 -1
View File
@@ -2,7 +2,7 @@ package test
import java.util.ArrayList
deprecated("Use A instead") open class MyClass {}
Deprecated("Use A instead") open class MyClass {}
fun test() {
val a : <warning descr="[DEPRECATED_SYMBOL_WITH_MESSAGE] 'MyClass' is deprecated. Use A instead">MyClass</warning>? = null
+2 -2
View File
@@ -13,13 +13,13 @@ fun test() {
}
class MyClass(): MyTrait {
deprecated("Use A instead") companion object {
Deprecated("Use A instead") companion object {
val test: String = ""
}
}
interface MyTrait {
deprecated("Use A instead") companion object {
Deprecated("Use A instead") companion object {
val test: String = ""
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
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
// NO_CHECK_INFOS
+4 -4
View File
@@ -6,14 +6,14 @@ fun test() {
<warning descr="[DEPRECATED_SYMBOL_WITH_MESSAGE] 'test4(Int, Int): Unit' is deprecated. Use A instead">test4</warning>(1, 2)
}
deprecated("Use A instead") fun test1() { }
deprecated("Use A instead") fun test4(x: Int, y: Int) { x + y }
Deprecated("Use A instead") fun test1() { }
Deprecated("Use A instead") fun test4(x: Int, y: Int) { x + y }
class MyClass() {
deprecated("Use A instead") fun test2() {}
Deprecated("Use A instead") fun test2() {}
companion object {
deprecated("Use A instead") fun test3() {}
Deprecated("Use A instead") fun test3() {}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
class MyClass {}
deprecated("Use A instead") fun MyClass.get(i: MyClass): MyClass { return i }
Deprecated("Use A instead") fun MyClass.get(i: MyClass): MyClass { return i }
fun test() {
val x1 = MyClass()
+4 -4
View File
@@ -9,13 +9,13 @@ fun test() {
class MyClass() {
public val test1: String = ""
@deprecated("Use A instead") get
@Deprecated("Use A instead") get
public var test2: String = ""
@deprecated("Use A instead") get
@Deprecated("Use A instead") get
deprecated("Use A instead") public val test3: String = ""
@deprecated("Use A instead") get
Deprecated("Use A instead") public val test3: String = ""
@Deprecated("Use A instead") get
}
// NO_CHECK_INFOS
+1 -1
View File
@@ -2,7 +2,7 @@ class MyClass {
val i = 0
}
deprecated("Use A instead") fun MyClass.inc(): MyClass { return MyClass() }
Deprecated("Use A instead") fun MyClass.inc(): MyClass { return MyClass() }
fun test() {
var x3 = MyClass()
+2 -2
View File
@@ -1,6 +1,6 @@
deprecated(<error>)</error>
Deprecated(<error>)</error>
fun foo() {}
deprecated(<error>false</error>)
Deprecated(<error>false</error>)
fun boo() {}
fun far() = <warning descr="[DEPRECATED_SYMBOL] 'foo(): Unit' is deprecated.">foo</warning>()
+1 -1
View File
@@ -1,6 +1,6 @@
class MyRunnable() {}
deprecated("Use A instead") fun MyRunnable.invoke() {
Deprecated("Use A instead") fun MyRunnable.invoke() {
}
fun test() {
+8 -8
View File
@@ -2,18 +2,18 @@ class MyClass {
val i = 0
}
deprecated("Use A instead") fun MyClass.minus(i: MyClass) { i.i }
deprecated("Use A instead") fun MyClass.div(i: MyClass) { i.i }
deprecated("Use A instead") fun MyClass.times(i: MyClass) { i.i }
Deprecated("Use A instead") fun MyClass.minus(i: MyClass) { i.i }
Deprecated("Use A instead") fun MyClass.div(i: MyClass) { i.i }
Deprecated("Use A instead") fun MyClass.times(i: MyClass) { i.i }
deprecated("Use A instead") fun MyClass.not() { }
deprecated("Use A instead") fun MyClass.plus() { }
Deprecated("Use A instead") fun MyClass.not() { }
Deprecated("Use A instead") fun MyClass.plus() { }
deprecated("Use A instead") fun MyClass.contains(i: MyClass): Boolean { i.i; return false }
Deprecated("Use A instead") fun MyClass.contains(i: MyClass): Boolean { i.i; return false }
deprecated("Use A instead") fun MyClass.plusAssign(i: MyClass) { i.i }
Deprecated("Use A instead") fun MyClass.plusAssign(i: MyClass) { i.i }
deprecated("Use A instead") fun MyClass.rangeTo(i: MyClass): IntRange { return IntRange(i.i, i.i) }
Deprecated("Use A instead") fun MyClass.rangeTo(i: MyClass): IntRange { return IntRange(i.i, i.i) }
fun test() {
val x1 = MyClass()
+6 -6
View File
@@ -8,16 +8,16 @@ fun test() {
MyClass.<warning descr="[DEPRECATED_SYMBOL_WITH_MESSAGE] 'test6: String' is deprecated. Use A instead">test6</warning>
}
deprecated("Use A instead") val test1: String = ""
deprecated("Use A instead") var test4: String = ""
Deprecated("Use A instead") val test1: String = ""
Deprecated("Use A instead") var test4: String = ""
class MyClass() {
deprecated("Use A instead") val test2: String = ""
deprecated("Use A instead") var test5: String = ""
Deprecated("Use A instead") val test2: String = ""
Deprecated("Use A instead") var test5: String = ""
companion object {
deprecated("Use A instead") val test3: String = ""
deprecated("Use A instead") var test6: String = ""
Deprecated("Use A instead") val test3: String = ""
Deprecated("Use A instead") var test6: String = ""
}
}
+1 -1
View File
@@ -2,7 +2,7 @@ class MyClass {
val i = 1
}
deprecated("Use A instead") fun MyClass.rangeTo(i: MyClass): Iterable<Int> {
Deprecated("Use A instead") fun MyClass.rangeTo(i: MyClass): Iterable<Int> {
i.i
throw Exception()
}
+2 -2
View File
@@ -19,11 +19,11 @@ fun test() {
class MyClass() {
public var test1: Int = 0
@deprecated("Use A instead") set
@Deprecated("Use A instead") set
}
public var test2: Int = 0
@deprecated("Use A instead") set
@Deprecated("Use A instead") set
// NO_CHECK_INFOS
// NO_CHECK_WEAK_WARNINGS
+1 -1
View File
@@ -1,4 +1,4 @@
deprecated("Use A instead") interface MyTrait { }
Deprecated("Use A instead") interface MyTrait { }
fun test() {
val a: <warning descr="[DEPRECATED_SYMBOL_WITH_MESSAGE] 'MyTrait' is deprecated. Use A instead">MyTrait</warning>? = null