FIR: fix serialization of accessor with source-level annotations
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// MODULE: lib
|
||||
// FILE: NameHighlighter.kt
|
||||
|
||||
object NameHighlighter {
|
||||
var namesHighlightingEnabled = true
|
||||
@TestOnly set
|
||||
}
|
||||
|
||||
// FILE: TestOnly.java
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
public @interface TestOnly {
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
fun box(): String {
|
||||
if (!NameHighlighter.namesHighlightingEnabled) return "FAIL 1"
|
||||
NameHighlighter.namesHighlightingEnabled = false
|
||||
if (NameHighlighter.namesHighlightingEnabled) return "FAIL 2"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user