Run LoadJava.CompiledKotlin test group with stdlib if some enum is inside
This commit makes compiler tests working similarly to ResolveByStub IDE tests.
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
enum class E { ENTRY }
|
||||
|
||||
annotation class StringOptions(vararg val option: String)
|
||||
annotation class EnumOption(val option: E)
|
||||
|
||||
annotation class OptionGroups(val o1: StringOptions, val o2: EnumOption)
|
||||
|
||||
@OptionGroups(StringOptions("abc", "d", "ef"), EnumOption(E.ENTRY))
|
||||
public class AnnotationInAnnotationArguments
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
package test
|
||||
|
||||
@test.OptionGroups(o1 = test.StringOptions(option = {"abc", "d", "ef"}), o2 = test.EnumOption(option = E.ENTRY)) public final class AnnotationInAnnotationArguments {
|
||||
/*primary*/ public constructor AnnotationInAnnotationArguments()
|
||||
}
|
||||
|
||||
public final enum class E : kotlin.Enum<test.E> {
|
||||
enum entry ENTRY
|
||||
|
||||
/*primary*/ private constructor E()
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-name>`(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-ordinal>`(): kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ val entries: kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun `<get-entries>`(): kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
|
||||
public final annotation class EnumOption : kotlin.Annotation {
|
||||
/*primary*/ public constructor EnumOption(/*0*/ option: test.E)
|
||||
public final val option: test.E
|
||||
public final fun `<get-option>`(): test.E
|
||||
}
|
||||
|
||||
public final annotation class OptionGroups : kotlin.Annotation {
|
||||
/*primary*/ public constructor OptionGroups(/*0*/ o1: test.StringOptions, /*1*/ o2: test.EnumOption)
|
||||
public final val o1: test.StringOptions
|
||||
public final fun `<get-o1>`(): test.StringOptions
|
||||
public final val o2: test.EnumOption
|
||||
public final fun `<get-o2>`(): test.EnumOption
|
||||
}
|
||||
|
||||
public final annotation class StringOptions : kotlin.Annotation {
|
||||
/*primary*/ public constructor StringOptions(/*0*/ vararg option: kotlin.String /*kotlin.Array<out kotlin.String>*/)
|
||||
public final val option: kotlin.Array<out kotlin.String>
|
||||
public final fun `<get-option>`(): kotlin.Array<out kotlin.String>
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
// This test checks that we don't accidentally call toString() on an enum value
|
||||
// to determine which enum entry appears in the annotation, and call name() instead
|
||||
|
||||
enum class E {
|
||||
CAKE {
|
||||
override fun toString() = "LIE"
|
||||
}
|
||||
}
|
||||
|
||||
annotation class EnumAnno(val value: E)
|
||||
annotation class EnumArrayAnno(vararg val value: E)
|
||||
|
||||
public class EnumArgumentWithCustomToString {
|
||||
@EnumAnno(E.CAKE)
|
||||
@EnumArrayAnno(E.CAKE, E.CAKE)
|
||||
fun annotated() {}
|
||||
}
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
package test
|
||||
|
||||
public final enum class E : kotlin.Enum<test.E> {
|
||||
enum entry CAKE
|
||||
|
||||
/*primary*/ private constructor E()
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-name>`(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-ordinal>`(): kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ val entries: kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun `<get-entries>`(): kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
|
||||
public final annotation class EnumAnno : kotlin.Annotation {
|
||||
/*primary*/ public constructor EnumAnno(/*0*/ value: test.E)
|
||||
public final val value: test.E
|
||||
public final fun `<get-value>`(): test.E
|
||||
}
|
||||
|
||||
public final class EnumArgumentWithCustomToString {
|
||||
/*primary*/ public constructor EnumArgumentWithCustomToString()
|
||||
@test.EnumAnno(value = E.CAKE) @test.EnumArrayAnno(value = {E.CAKE, E.CAKE}) public final fun annotated(): kotlin.Unit
|
||||
}
|
||||
|
||||
public final annotation class EnumArrayAnno : kotlin.Annotation {
|
||||
/*primary*/ public constructor EnumArrayAnno(/*0*/ vararg value: test.E /*kotlin.Array<out test.E>*/)
|
||||
public final val value: kotlin.Array<out test.E>
|
||||
public final fun `<get-value>`(): kotlin.Array<out test.E>
|
||||
}
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
package test
|
||||
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER)
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// ALLOW_AST_ACCESS
|
||||
// NO_CHECK_SOURCE_VS_BINARY
|
||||
//^ While compiling source, we do not store annotation default values, but we load them when reading compiled files
|
||||
package test
|
||||
|
||||
annotation class Anno(val value: String = "0", val x: Int = 0)
|
||||
annotation class Bnno
|
||||
|
||||
enum class Eee {
|
||||
@Anno()
|
||||
Entry1,
|
||||
Entry2,
|
||||
@Anno("3") @Bnno
|
||||
Entry3,
|
||||
@Anno("4", 4)
|
||||
Entry4,
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package test
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
/*primary*/ public constructor Anno(/*0*/ value: kotlin.String = ..., /*1*/ x: kotlin.Int = ...)
|
||||
public final val value: kotlin.String = "0"
|
||||
public final fun `<get-value>`(): kotlin.String
|
||||
public final val x: kotlin.Int = 0
|
||||
public final fun `<get-x>`(): kotlin.Int
|
||||
}
|
||||
|
||||
public final annotation class Bnno : kotlin.Annotation {
|
||||
/*primary*/ public constructor Bnno()
|
||||
}
|
||||
|
||||
public final enum class Eee : kotlin.Enum<test.Eee> {
|
||||
@test.Anno enum entry Entry1
|
||||
|
||||
enum entry Entry2
|
||||
|
||||
@test.Anno(value = "3") @test.Bnno enum entry Entry3
|
||||
|
||||
@test.Anno(value = "4", x = 4) enum entry Entry4
|
||||
|
||||
/*primary*/ private constructor Eee()
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-name>`(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-ordinal>`(): kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.Eee): kotlin.Int
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.Eee!>!
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ val entries: kotlin.enums.EnumEntries<test.Eee>
|
||||
public final /*synthesized*/ fun `<get-entries>`(): kotlin.enums.EnumEntries<test.Eee>
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.Eee
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Eee>
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
annotation class A
|
||||
annotation class B
|
||||
|
||||
enum class E(@[A] val x: String, @[B] val y: Int)
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
package test
|
||||
|
||||
public final annotation class A : kotlin.Annotation {
|
||||
/*primary*/ public constructor A()
|
||||
}
|
||||
|
||||
public final annotation class B : kotlin.Annotation {
|
||||
/*primary*/ public constructor B()
|
||||
}
|
||||
|
||||
public final enum class E : kotlin.Enum<test.E> {
|
||||
/*primary*/ private constructor E(/*0*/ @test.A x: kotlin.String, /*1*/ @test.B y: kotlin.Int)
|
||||
@kotlin.internal.IntrinsicConstEvaluation public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-name>`(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun `<get-ordinal>`(): kotlin.Int
|
||||
public final val x: kotlin.String
|
||||
public final fun `<get-x>`(): kotlin.String
|
||||
public final val y: kotlin.Int
|
||||
public final fun `<get-y>`(): kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ val entries: kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun `<get-entries>`(): kotlin.enums.EnumEntries<test.E>
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
Reference in New Issue
Block a user