Files
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
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.
2022-08-12 09:35:27 +00:00

30 lines
951 B
Plaintext
Vendored

FILE: notInsideBranches.kt
public final enum class Some : R|kotlin/Enum<Some>| {
private constructor(): R|Some| {
super<R|kotlin/Enum<Some>|>()
}
public final static enum entry FIRST: R|Some|
public final static enum entry SECOND: R|Some|
public final static fun values(): R|kotlin/Array<Some>| {
}
public final static fun valueOf(value: R|kotlin/String|): R|Some| {
}
public final static val entries: R|kotlin/enums/EnumEntries<Some>|
public get(): R|kotlin/enums/EnumEntries<Some>|
}
public final fun foo(s: R|Some|): <ERROR TYPE REF: Cannot infer argument for type parameter K> {
^foo when (R|<local>/s|) {
==($subj$, R|/Some.FIRST|) -> {
<Unresolved name: SECOND>#
}
==($subj$, R|/Some.SECOND|) -> {
<Unresolved name: FIRST>#
}
}
}