Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/annotations/explicitMetadata.kt
T
Alexander Udalov f423403167 Make kotlin.Metadata public
Prohibit explicit usage of `@Metadata` to prevent possible
AnnotationFormatError at runtime

 #KT-23602 Fixed
2018-08-30 14:50:25 +03:00

10 lines
259 B
Kotlin
Vendored

<!EXPLICIT_METADATA_IS_DISALLOWED!>@Metadata<!>
class A
<!EXPLICIT_METADATA_IS_DISALLOWED!>@Metadata(xs = "_")<!>
annotation class B(val m: Metadata)
<!WRONG_ANNOTATION_TARGET, EXPLICIT_METADATA_IS_DISALLOWED!>@Metadata(xi = 0)<!>
@B(Metadata())
fun f() {}