mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
27 lines
390 B
Kotlin
Vendored
27 lines
390 B
Kotlin
Vendored
// FILE: A.java
|
|
|
|
public class A {
|
|
public static final int X = 1;
|
|
public static final int Y;
|
|
|
|
public final int z = 3;
|
|
|
|
static {
|
|
Y = 2;
|
|
}
|
|
}
|
|
|
|
// FILE: main.kt
|
|
|
|
annotation class Ann(val x: Int)
|
|
|
|
@Ann(A.X)
|
|
fun main1() {}
|
|
|
|
@Ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>A.Y<!>)
|
|
fun main2() {}
|
|
|
|
val q = A()
|
|
@Ann(<!ANNOTATION_PARAMETER_MUST_BE_CONST!>q.z<!>)
|
|
fun main3() {}
|