Remove diagnostic tags from black box spec tests for annotations
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann
|
||||
|
||||
fun foo(x: String): @Ann(unresolved_reference) String { // OK, error only in IDE but not in the compiler
|
||||
fun foo(x: String): @Ann(unresolved_reference) String {
|
||||
return x
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -14,13 +14,13 @@
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
fun case_1(): Any {
|
||||
val x: (Int) -> @Ann(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) Unit = {} // OK, no error in IDE and in the compiler
|
||||
val x: (Int) -> @Ann(unresolved_reference) Unit = {}
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
fun case_2(): Any {
|
||||
val x: (@Ann(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) Int) -> Unit = { a: Int -> println(a) } // OK, no error in IDE and in the compiler
|
||||
val x: (@Ann(unresolved_reference) Int) -> Unit = { a: Int -> println(a) }
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
@Target(AnnotationTarget.PROPERTY_GETTER)
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
class Foo : @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(10) Any()
|
||||
class Foo : @Ann(10) Any()
|
||||
|
||||
class Bar<T : @Ann(10) Any>
|
||||
|
||||
@@ -22,10 +22,10 @@ fun case_3(a: Any): Int? {
|
||||
|
||||
open class TypeToken<T>
|
||||
|
||||
val case_4 = object : TypeToken<@<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(10) String>() {}
|
||||
val case_4 = object : TypeToken<@Ann(10) String>() {}
|
||||
|
||||
fun case_5(a: Any): Any {
|
||||
a as @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(10) Int
|
||||
a as @Ann(10) Int
|
||||
|
||||
return a
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
abstract class Foo : @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) Any()
|
||||
abstract class Foo : @Ann(unresolved_reference) Any()
|
||||
|
||||
class Bar: Foo()
|
||||
|
||||
|
||||
+3
-3
@@ -13,11 +13,11 @@ annotation class Ann(val x: Int)
|
||||
|
||||
class Inv<T>
|
||||
|
||||
fun foo(i: Inv<@Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) String>) {}
|
||||
fun foo(i: Inv<@Ann(unresolved_reference) String>) {}
|
||||
|
||||
fun bar(vararg a: @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) Any) {}
|
||||
fun bar(vararg a: @Ann(unresolved_reference) Any) {}
|
||||
|
||||
class A<T>(a: @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) T)
|
||||
class A<T>(a: @Ann(unresolved_reference) T)
|
||||
|
||||
fun box(): String? {
|
||||
val x = foo(Inv<String>())
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ annotation class Ann(val x: Int)
|
||||
|
||||
class Inv<T>
|
||||
|
||||
fun case_1(): Inv<@Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) String> = TODO()
|
||||
fun case_1(): Inv<@Ann(unresolved_reference) String> = TODO()
|
||||
|
||||
fun box(): String? {
|
||||
try {
|
||||
|
||||
+2
-2
@@ -11,11 +11,11 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
abstract class Bar<T : @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) Any>
|
||||
abstract class Bar<T : @Ann(unresolved_reference) Any>
|
||||
|
||||
class Foo<T : Any> : Bar<T>()
|
||||
|
||||
class B<T> where @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) T : Number
|
||||
class B<T> where @Ann(unresolved_reference) T : Number
|
||||
|
||||
fun box(): String? {
|
||||
val x = Foo<Int>()
|
||||
|
||||
+3
-3
@@ -12,17 +12,17 @@
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
fun case_1(a: Any): Int? {
|
||||
return if (a is @Ann(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) String) 10 else null
|
||||
return if (a is @Ann(unresolved_reference) String) 10 else null
|
||||
}
|
||||
|
||||
fun case_2(a: Any): Any {
|
||||
return a as @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) String // OK, no error in IDE and in the compiler
|
||||
return a as @Ann(unresolved_reference) String
|
||||
}
|
||||
|
||||
fun case_3_1(a: Any) = 10
|
||||
|
||||
fun case_3(a: Any): Any {
|
||||
return case_3_1(a as @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) String) // OK, no error in IDE and in the compiler
|
||||
return case_3_1(a as @Ann(unresolved_reference) String)
|
||||
}
|
||||
|
||||
fun box(): String? {
|
||||
|
||||
+2
-2
@@ -13,11 +13,11 @@ annotation class Ann
|
||||
|
||||
open class TypeToken<T>
|
||||
|
||||
val case_1 = object : TypeToken<@<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) String>() {}
|
||||
val case_1 = object : TypeToken<@Ann(unresolved_reference) String>() {}
|
||||
|
||||
interface A
|
||||
|
||||
val case_2 = object: @<!DEBUG_INFO_MISSING_UNRESOLVED!>Ann<!>(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) A {}
|
||||
val case_2 = object: @Ann(unresolved_reference) A {}
|
||||
|
||||
fun box(): String? {
|
||||
val x = case_1
|
||||
|
||||
+2
-2
@@ -11,10 +11,10 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Ann(val x: Int)
|
||||
|
||||
val <T> @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) T.test // OK, error only in IDE but not in the compiler
|
||||
val <T> @Ann(unresolved_reference) T.test // OK, error only in IDE but not in the compiler
|
||||
get() = 10
|
||||
|
||||
val @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) Int.test
|
||||
val @Ann(unresolved_reference) Int.test
|
||||
get() = 10
|
||||
|
||||
fun box(): String? {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ annotation class Ann
|
||||
|
||||
var <T> T.test
|
||||
get() = 11
|
||||
set(value: @Ann(<!DEBUG_INFO_MISSING_UNRESOLVED!>unresolved_reference<!>) Int) {}
|
||||
set(value: @Ann(unresolved_reference) Int) {}
|
||||
|
||||
fun box(): String? {
|
||||
val x = 10.test
|
||||
|
||||
Reference in New Issue
Block a user