Disallow using optional annotations outside common module sources
#KT-25196 Fixed
This commit is contained in:
@@ -23,6 +23,8 @@ actual annotation class A(actual val x: Int)
|
||||
// MODULE: main(library)
|
||||
// FILE: main.kt
|
||||
|
||||
@file:Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE") // TODO: support common sources in the test infrastructure
|
||||
|
||||
package usage
|
||||
|
||||
import a.A
|
||||
|
||||
@@ -9,6 +9,8 @@ expect annotation class Anno(val s: String)
|
||||
|
||||
// FILE: jvm.kt
|
||||
|
||||
@file:Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE") // TODO: support common sources in the test infrastructure
|
||||
|
||||
import java.lang.reflect.AnnotatedElement
|
||||
|
||||
@Anno("Foo")
|
||||
|
||||
Reference in New Issue
Block a user