7333589663
Before this commit, we added Enum.entries only in case when LanguageFeature.EnumEntries was ON (with an exception in K1/Java case). In this commit we add Enum.entries unconditionally, and in case the language feature is OFF we filter them out during tower resolve.
38 lines
1.5 KiB
Plaintext
Vendored
38 lines
1.5 KiB
Plaintext
Vendored
FILE: enumValues.kt
|
|
public final enum class MyEnum : R|kotlin/Enum<MyEnum>| {
|
|
private constructor(): R|MyEnum| {
|
|
super<R|kotlin/Enum<MyEnum>|>()
|
|
}
|
|
|
|
public final static enum entry FIRST: R|MyEnum|
|
|
public final static enum entry SECOND: R|MyEnum|
|
|
public final static enum entry LAST: R|MyEnum|
|
|
public final fun bar(): R|kotlin/Int| {
|
|
^bar Int(42)
|
|
}
|
|
|
|
public final static fun values(): R|kotlin/Array<MyEnum>| {
|
|
}
|
|
|
|
public final static fun valueOf(value: R|kotlin/String|): R|MyEnum| {
|
|
}
|
|
|
|
public final static val entries: R|kotlin/enums/EnumEntries<MyEnum>|
|
|
public get(): R|kotlin/enums/EnumEntries<MyEnum>|
|
|
|
|
}
|
|
public final fun foo(): R|kotlin/Unit| {
|
|
lval values: R|kotlin/Array<MyEnum>| = Q|MyEnum|.R|/MyEnum.values|()
|
|
{
|
|
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
|
while(R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()) {
|
|
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
|
R|<local>/value|.R|/MyEnum.bar|()
|
|
}
|
|
|
|
}
|
|
|
|
lval first: R|MyEnum| = Q|MyEnum|.R|/MyEnum.valueOf|(String(FIRST))
|
|
lval last: R|MyEnum| = Q|MyEnum|.R|/MyEnum.valueOf|(String(LAST))
|
|
}
|