4c75fb108f
...when annotations arguments are lazily resolved. MR: KT-MR-12245 ^KT-60671
36 lines
1.0 KiB
Kotlin
Vendored
36 lines
1.0 KiB
Kotlin
Vendored
// Test for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic when annotations arguments are lazily resolved.
|
|
|
|
// LANGUAGE: +MultiPlatformProjects
|
|
// MODULE: common
|
|
// TARGET_PLATFORM: Common
|
|
@Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION)
|
|
annotation class Ann(val s: String = "default")
|
|
|
|
expect fun onType_negative(): @Ann("") Any
|
|
expect fun onType_positive(): @Ann("") Any
|
|
|
|
@Ann("")
|
|
expect fun onFunction_negative()
|
|
@Ann("")
|
|
expect fun onFunction_positive()
|
|
|
|
@Ann
|
|
expect fun withEmptyArguments_negative()
|
|
@Ann
|
|
expect fun withEmptyArguments_positive()
|
|
|
|
// MODULE: main()()(common)
|
|
// TARGET_PLATFORM: JVM
|
|
actual fun onType_negative(): @Ann("") Any = Any()
|
|
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>onType_positive<!>(): @Ann("incorrect") Any = Any()
|
|
|
|
@Ann("")
|
|
actual fun onFunction_negative() {}
|
|
@Ann("incorrect")
|
|
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>onFunction_positive<!>() {}
|
|
|
|
@Ann
|
|
actual fun withEmptyArguments_negative() {}
|
|
@Ann("incorrect")
|
|
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>withEmptyArguments_positive<!>() {}
|