Files
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00

31 lines
825 B
Plaintext
Vendored

FILE: when.kt
public final fun test_1(x: R|kotlin/Int|): R|kotlin/Unit| {
lval y: R|kotlin/Int| = when () {
==(R|<local>/x|, Int(1)) -> {
Int(10)
}
==(R|<local>/x|.R|kotlin/Int.rem|(Int(2)), Int(0)) -> {
Int(20)
}
==(Int(1).R|kotlin/Int.minus|(Int(1)), Int(0)) -> {
^test_1 Unit
}
else -> {
Int(5)
}
}
}
public abstract interface A : R|kotlin/Any| {
}
public abstract interface B : R|kotlin/Any| {
}
public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| {
when () {
(R|<local>/x| is R|A|) && (R|<local>/x| is R|B|) -> {
(R|<local>/x| is R|A|)
}
}
}