Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.txt
T
2020-09-09 12:38:34 +03:00

36 lines
1.2 KiB
Plaintext
Vendored

FILE: orInWhenBranch.kt
public final fun R|kotlin/String|.foo(): R|kotlin/Unit| {
}
public final fun test_1(a: R|kotlin/Any?|): R|kotlin/Unit| {
when (R|<local>/a|) {
($subj$ is R|kotlin/String|) || ($subj$ is R|kotlin/Any|) -> {
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /foo>#()
}
}
}
public final fun test_2(a: R|kotlin/Any?|): R|kotlin/Unit| {
when () {
(R|<local>/a| is R|kotlin/String|) || (R|<local>/a| is R|kotlin/Any|) -> {
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /foo>#()
}
}
}
public final fun test_3(a: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
when (R|<local>/a|) {
($subj$ is R|kotlin/String|) || ==($subj$, R|<local>/b|) -> {
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /foo>#()
}
}
}
public final fun test_4(a: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
when () {
(R|<local>/a| is R|kotlin/String|) || R|<local>/b| -> {
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /foo>#()
}
}
}