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.
108 lines
2.8 KiB
Plaintext
Vendored
108 lines
2.8 KiB
Plaintext
Vendored
FILE: whenElse.kt
|
|
public final enum class A : R|kotlin/Enum<A>| {
|
|
private constructor(): R|A| {
|
|
super<R|kotlin/Enum<A>|>()
|
|
}
|
|
|
|
public final static enum entry A1: R|A|
|
|
public final static enum entry A2: R|A|
|
|
public final static fun values(): R|kotlin/Array<A>| {
|
|
}
|
|
|
|
public final static fun valueOf(value: R|kotlin/String|): R|A| {
|
|
}
|
|
|
|
public final static val entries: R|kotlin/enums/EnumEntries<A>|
|
|
public get(): R|kotlin/enums/EnumEntries<A>|
|
|
|
|
}
|
|
public final class B : R|kotlin/Any| {
|
|
public constructor(): R|B| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
}
|
|
public final class C : R|kotlin/Any| {
|
|
public constructor(b: R|B|): R|C| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final val b: R|B| = R|<local>/b|
|
|
public get(): R|B|
|
|
|
|
}
|
|
public final fun get(f: R|kotlin/Boolean|): R|kotlin/Any| {
|
|
^get when () {
|
|
R|<local>/f| -> {
|
|
Q|A|.R|/A.A1|
|
|
}
|
|
else -> {
|
|
String()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun case2(): R|kotlin/Unit| {
|
|
lval flag: R|kotlin/Any| = R|/get|(Boolean(false))
|
|
lval l1: R|kotlin/Unit| = when (R|<local>/flag|!!) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
lval l2: R|kotlin/Unit| = when (R|<local>/flag|) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun case2(): R|kotlin/Unit| {
|
|
lval flag: R|kotlin/Any| = R|/get|(Boolean(true))
|
|
lval l1: R|kotlin/Unit| = when (R|<local>/flag|!!) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
lval l2: R|kotlin/Unit| = when (R|<local>/flag|) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
}
|
|
public final fun case3(): R|kotlin/Unit| {
|
|
lval flag: R|kotlin/String| = String()
|
|
lval l1: R|kotlin/Unit| = when (R|<local>/flag|!!) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
lval l2: R|kotlin/Unit| = when (R|<local>/flag|) {
|
|
==($subj$, Q|A|.R|/A.A1|) -> {
|
|
R|/B.B|()
|
|
}
|
|
==($subj$, Q|A|.R|/A.A2|) -> {
|
|
R|/B.B|()
|
|
}
|
|
}
|
|
|
|
}
|