Files
Michael Bogdanov 3452fc8d02 Don't initialize const properties in constructor
#KT-9532 Fixed
2015-10-17 15:31:57 +03:00

16 lines
424 B
Java
Vendored

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
public class JavaClass {
@Retention(RetentionPolicy.RUNTIME)
@interface Foo {
int value();
}
@Foo(KotlinInterface.FOO_INT)
public String test() throws NoSuchMethodException {
return KotlinInterface.FOO_STRING +
JavaClass.class.getMethod("test").getAnnotation(Foo.class).value();
}
}