FIR2IR: pass annotationMode through arrayOf calls properly

#KT-50163 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-12-10 08:41:45 +03:00
parent 09585d116e
commit 66231baa06
4 changed files with 87 additions and 8 deletions
+59
View File
@@ -0,0 +1,59 @@
// TARGET_BACKEND: JVM_IR
// MODULE: m1
// FILE: State.java
public @interface State {
String name();
Storage[] storages() default {};
boolean reloadable() default true;
boolean defaultStateAsResource() default false;
boolean reportStatistic() default false;
}
// FILE: Storage.java
public @interface Storage {
String file() default "";
String value() default "";
boolean deprecated() default false;
RoamingType roamingType() default RoamingType.DEFAULT;
}
// FILE: RoamingType.java
public enum RoamingType {
DISABLED,
PER_OS,
DEFAULT,
}
// FILE: StoragePathMacros.java
public class StoragePathMacros {
public static final String NON_ROAMABLE_FILE = "NON_ROAMABLE_FILE";
}
// MODULE: m2(m1)
// FILE: test.kt
@State(name = "RecentDirectoryProjectsManager",
storages = [Storage(value = "recentProjectDirectories.xml", roamingType = RoamingType.DISABLED, deprecated = true)],
reportStatistic = false)
class Some
@State(name = "RecentProjectsManager", storages = [Storage(value = "recentProjects.xml", roamingType = RoamingType.DISABLED)])
class Other
@State(name = "A", storages = [(Storage(value = StoragePathMacros.NON_ROAMABLE_FILE))])
class Another
fun box(): String {
Some()
Other()
Another()
return "OK"
}