Deprecate escaped modifiers and unescaped annotations

This commit is contained in:
Denis Zharkov
2015-09-08 12:11:30 +03:00
parent 25cd9de71a
commit 676ca86ea4
184 changed files with 979 additions and 787 deletions
+3 -4
View File
@@ -1,12 +1,11 @@
<info descr="null" textAttributesKey="KOTLIN_ANNOTATION">target</info>(<info descr="null" textAttributesKey="KOTLIN_CLASS">AnnotationTarget</info>.<info descr="null" textAttributesKey="KOTLIN_ENUM_ENTRY">CLASSIFIER</info>, <info descr="null" textAttributesKey="KOTLIN_CLASS">AnnotationTarget</info>.<info descr="null" textAttributesKey="KOTLIN_ENUM_ENTRY">EXPRESSION</info>)
<info descr="null" textAttributesKey="KOTLIN_ANNOTATION">@Target</info>(<info descr="null" textAttributesKey="KOTLIN_CLASS">AnnotationTarget</info>.<info descr="null" textAttributesKey="KOTLIN_ENUM_ENTRY">CLASSIFIER</info>, <info descr="null" textAttributesKey="KOTLIN_CLASS">AnnotationTarget</info>.<info descr="null" textAttributesKey="KOTLIN_ENUM_ENTRY">EXPRESSION</info>)
<info descr="null">annotation</info> class <info descr="null">Ann</info>
<info descr="null" textAttributesKey="KOTLIN_ANNOTATION">Ann</info> class <info descr="null">A1</info>
<info descr="null" textAttributesKey="KOTLIN_ANNOTATION">@Ann</info> class <info descr="null">A2</info>
<info descr="null" textAttributesKey="KOTLIN_ANNOTATION">@Ann</info> class <info descr="null">A</info>
fun <info descr="null">bar</info>(<info descr="null">block</info>: () -> <info descr="null">Int</info>) = <info descr="null"><info descr="null">block</info></info>()
<info descr="null" textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">@private</info>
<info descr="null" textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">private</info>
fun <info descr="null">foo</info>() {
1 + <info descr="null" textAttributesKey="KOTLIN_ANNOTATION">@Ann</info> 2
+1 -1
View File
@@ -1,2 +1,2 @@
<info textAttributesKey="KOTLIN_ANNOTATION">SuppressWarnings</info> class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttributesKey="KOTLIN_TRAIT">Runnable</info>, <info textAttributesKey="KOTLIN_CLASS"><info textAttributesKey="KOTLIN_CONSTRUCTOR">Thread</info></info>() {
<info textAttributesKey="KOTLIN_ANNOTATION">@SuppressWarnings</info> class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttributesKey="KOTLIN_TRAIT">Runnable</info>, <info textAttributesKey="KOTLIN_CLASS"><info textAttributesKey="KOTLIN_CONSTRUCTOR">Thread</info></info>() {
}
+1 -1
View File
@@ -8,5 +8,5 @@ class <info textAttributesKey="KOTLIN_CLASS">TheClass</info> : <info textAttribu
<info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">annotation</info> class <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>> {
<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()
+1 -1
View File
@@ -14,7 +14,7 @@ class MyClass() {
public var test2: String = ""
@Deprecated("Use A instead") get
Deprecated("Use A instead") public val test3: String = ""
@Deprecated("Use A instead") public val test3: String = ""
@Deprecated("Use A instead") get
}
+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()
}
+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