Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/literalInWhenSubject.fir.txt
T
2022-01-17 17:59:23 +03:00

32 lines
878 B
Plaintext
Vendored

FILE: literalInWhenSubject.kt
public final fun test_1(s: R|kotlin/String?|): R|kotlin/Unit| {
when (Boolean(true)) {
==($subj$, !=(R|<local>/s|, Null(null))) -> {
R|<local>/s|.R|kotlin/String.length|
}
else -> {
Null(null)
}
}
}
public final fun test_2(s: R|kotlin/String?|): R|kotlin/Unit| {
when (!=(R|<local>/s|, Null(null))) {
==($subj$, Boolean(true)) -> {
R|<local>/s|.R|kotlin/String.length|
}
else -> {
Null(null)
}
}
}
public final fun test_3(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
==(Boolean(true), !=(R|<local>/s|, Null(null))) -> {
R|<local>/s|.R|kotlin/String.length|
}
}
}