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
@@ -1,79 +1,79 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
native
@native
class A {
nativeGetter
@nativeGetter
fun get(a: String): Any? = null
nativeGetter
@nativeGetter
fun take(a: Number): String? = null
nativeGetter
@nativeGetter
fun foo(a: Double): String? = null
companion object {
nativeGetter
@nativeGetter
fun get(a: String): Any? = null
nativeGetter
@nativeGetter
fun take(a: Number): String? = null
nativeGetter
@nativeGetter
fun foo(a: Double): String? = null
}
}
native
@native
class B {
<!WRONG_ANNOTATION_TARGET!>nativeGetter<!>
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
val foo = 0
<!WRONG_ANNOTATION_TARGET!>nativeGetter<!>
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
object Obj1 {}
companion object {
<!WRONG_ANNOTATION_TARGET!>nativeGetter<!>
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
val foo = 0
<!WRONG_ANNOTATION_TARGET!>nativeGetter<!>
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
object Obj2 {}
}
}
native
@native
class C {
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get(a: String): Int?<!> = 1
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get2(a: Number): String?<!> = "OK"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get3(a: Int): String?<!> = "OK"
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>nativeGetter
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeGetter
fun get(): Any?<!> = null
nativeGetter
@nativeGetter
fun get(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: A<!>): Any? = null
nativeGetter
@nativeGetter
fun <!NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE!>foo<!>(a: Int) {}
nativeGetter
@nativeGetter
fun bar(a: String): <!NATIVE_GETTER_RETURN_TYPE_SHOULD_BE_NULLABLE!>Int<!> = 0
nativeGetter
@nativeGetter
fun baz(<!NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS!>a: String = "foo"<!>): Int? = 0
companion object {
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get(a: String): Int?<!> = 1
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get2(a: Number): String?<!> = "OK"
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>nativeGetter
<!NATIVE_ANNOTATIONS_ALLOWED_ONLY_ON_MEMBER_OR_EXTENSION_FUN!>@nativeGetter
fun Int.get3(a: Int): String?<!> = "OK"
}