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.
42 lines
1.5 KiB
Plaintext
Vendored
42 lines
1.5 KiB
Plaintext
Vendored
FILE: enumEntryUse.kt
|
|
public final enum class TestEnum : R|kotlin/Enum<TestEnum>| {
|
|
private constructor(): R|TestEnum| {
|
|
super<R|kotlin/Enum<TestEnum>|>()
|
|
}
|
|
|
|
public final static enum entry FIRST: R|TestEnum|
|
|
public final static enum entry SECOND: R|TestEnum|
|
|
public final static enum entry THIRD: R|TestEnum| = object : R|TestEnum| {
|
|
private constructor(): R|<anonymous>| {
|
|
super<R|TestEnum|>()
|
|
}
|
|
|
|
public final fun foo(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
|
|
public final static fun values(): R|kotlin/Array<TestEnum>| {
|
|
}
|
|
|
|
public final static fun valueOf(value: R|kotlin/String|): R|TestEnum| {
|
|
}
|
|
|
|
public final static val entries: R|kotlin/enums/EnumEntries<TestEnum>|
|
|
public get(): R|kotlin/enums/EnumEntries<TestEnum>|
|
|
|
|
}
|
|
public final fun use(some: R|kotlin/Any?|): R|kotlin/Unit| {
|
|
}
|
|
public final fun useEnum(some: R|TestEnum|): R|kotlin/Unit| {
|
|
}
|
|
public final fun useVararg(vararg some: R|kotlin/Array<out TestEnum>|): R|kotlin/Unit| {
|
|
}
|
|
public final fun test(): R|kotlin/Unit| {
|
|
R|/use|(Q|TestEnum|.R|/TestEnum.FIRST|)
|
|
R|/useEnum|(Q|TestEnum|.R|/TestEnum.SECOND|)
|
|
R|/useEnum|(Q|TestEnum|.R|/TestEnum.THIRD|)
|
|
R|/useVararg|(vararg(Q|TestEnum|.R|/TestEnum.FIRST|, Q|TestEnum|.R|/TestEnum.SECOND|))
|
|
<Inapplicable(INAPPLICABLE): /useVararg>#(Int(1), Int(2), Int(3), Int(4), Int(5))
|
|
}
|