Assert that reference annotation argument is always an enum value
Rename JavaReferenceAnnotationArgument on that occasion to JavaEnumValueAnnotationArgument. Also add a test on a nested enum annotation argument
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
public class NestedEnumArgument {
|
||||
public enum E {
|
||||
FIRST
|
||||
}
|
||||
|
||||
@interface Anno {
|
||||
E value();
|
||||
}
|
||||
|
||||
@Anno(E.FIRST)
|
||||
void foo() {}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package test
|
||||
|
||||
public open class NestedEnumArgument {
|
||||
public constructor NestedEnumArgument()
|
||||
test.NestedEnumArgument.Anno(value = E.FIRST: test.NestedEnumArgument.E) public/*package*/ open fun foo(): kotlin.Unit
|
||||
|
||||
public/*package*/ final annotation class Anno : kotlin.Annotation {
|
||||
public/*package*/ constructor Anno(/*0*/ value: test.NestedEnumArgument.E)
|
||||
public abstract fun value(): test.NestedEnumArgument.E
|
||||
}
|
||||
|
||||
public final enum class E : kotlin.Enum<test.NestedEnumArgument.E> {
|
||||
private constructor E()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public enum entry FIRST : test.NestedEnumArgument.E {
|
||||
private constructor FIRST()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-FIRST> : test.NestedEnumArgument.E.FIRST {
|
||||
private constructor <class-object-for-FIRST>()
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.NestedEnumArgument.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.NestedEnumArgument.E>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user