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:
Mikhail Glukhikh
2022-08-17 20:08:24 +02:00
committed by Space
parent fb1c80a7c9
commit d3648bce0c
35 changed files with 476 additions and 500 deletions
@@ -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() {}
}