[Tests] Cover rendering of KClass annotation args in
...`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT`. ^KT-62559
This commit is contained in:
committed by
Space Team
parent
29c82c668f
commit
fa897e4148
+7
@@ -12,6 +12,11 @@ expect fun stringConcat()
|
||||
|
||||
expect fun onType(): @Ann2("") Any?
|
||||
|
||||
annotation class Ann3(val kclass: kotlin.reflect.KClass<*>)
|
||||
|
||||
@Ann3(String::class)
|
||||
expect fun kclassArg()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("Ann; Ann; Annotation `kotlin.annotation.Target` is missing on actual declaration")!>actual annotation class Ann<!>
|
||||
@@ -20,3 +25,5 @@ expect fun onType(): @Ann2("") Any?
|
||||
|
||||
// Not reported in K1, because supported starting from K2
|
||||
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("onType; onType; Annotation `Ann2` is missing on actual declaration")!>actual fun onType(): Any? = null<!>
|
||||
|
||||
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("kclassArg; kclassArg; Annotation `Ann3` is missing on actual declaration")!>actual fun kclassArg() {}<!>
|
||||
|
||||
+7
@@ -12,6 +12,11 @@ expect fun stringConcat()
|
||||
|
||||
expect fun onType(): @Ann2("") Any?
|
||||
|
||||
annotation class Ann3(val kclass: kotlin.reflect.KClass<*>)
|
||||
|
||||
@Ann3(String::class)
|
||||
expect fun kclassArg()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
actual annotation class <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("annotation class Ann : Annotation defined in root package in file common.kt; annotation class Ann : Annotation defined in root package in file jvm.kt; Annotation `@Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.CLASS})` is missing on actual declaration")!>Ann<!>
|
||||
@@ -20,3 +25,5 @@ actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun stringConcat(): Unit defin
|
||||
|
||||
// Not reported in K1, because supported starting from K2
|
||||
actual fun onType(): Any? = null
|
||||
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun kclassArg(): Unit defined in root package in file common.kt; fun kclassArg(): Unit defined in root package in file jvm.kt; Annotation `@Ann3(kclass = kotlin.String::class)` is missing on actual declaration")!>kclassArg<!>() {}
|
||||
|
||||
+7
@@ -12,6 +12,11 @@ expect fun stringConcat()
|
||||
|
||||
expect fun onType(): @Ann2("") Any?
|
||||
|
||||
annotation class Ann3(val kclass: kotlin.reflect.KClass<*>)
|
||||
|
||||
@Ann3(String::class)
|
||||
expect fun kclassArg()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
actual annotation class <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("annotation class Ann : Annotation; annotation class Ann : Annotation; Annotation `@Target(allowedTargets = vararg(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS))` is missing on actual declaration")!>Ann<!>
|
||||
@@ -20,3 +25,5 @@ actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun stringConcat(): Unit; fun
|
||||
|
||||
// Not reported in K1, because supported starting from K2
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun onType(): @Ann2(...) Any?; fun onType(): Any?; Annotation `@Ann2(s = String())` is missing on actual declaration")!>onType<!>(): Any? = null
|
||||
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun kclassArg(): Unit; fun kclassArg(): Unit; Annotation `@Ann3(kclass = <getClass>(String))` is missing on actual declaration")!>kclassArg<!>() {}
|
||||
|
||||
Reference in New Issue
Block a user