Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.fir.txt
T
2021-11-26 11:26:21 +03:00

30 lines
825 B
Plaintext
Vendored

FILE: whenSubjectExpression.kt
public final fun whenWithSubjectExpression(x: R|kotlin/Any|): R|kotlin/Unit| {
when (R|<local>/x|) {
($subj$ !is R|kotlin/Double|) -> {
Int(-1)
}
==($subj$, Double(0.0)) -> {
Int(0)
}
else -> {
R|<local>/x|.R|kotlin/Double.toInt|()
}
}
}
public final fun whenWithSubjectVariable(x: R|kotlin/Any|): R|kotlin/Unit| {
when (lval y: R|kotlin/Any| = R|<local>/x|) {
($subj$ !is R|kotlin/Double|) -> {
Int(-1)
}
==($subj$, Double(0.0)) -> {
Int(0)
}
else -> {
R|<local>/y|.R|kotlin/Double.toInt|()
}
}
}