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

49 lines
1.6 KiB
Plaintext
Vendored

FILE: safeCallAndEqualityToBool.kt
public final fun R|kotlin/String|.check(): R|kotlin/Boolean| {
^check Boolean(true)
}
public final fun test_1(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
==(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(true)) -> {
R|<local>/s|.R|kotlin/String.length|
}
else -> {
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
}
}
}
public final fun test_2(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
==(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(false)) -> {
R|<local>/s|.R|kotlin/String.length|
}
else -> {
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
}
}
}
public final fun test_3(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
!=(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(true)) -> {
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
}
else -> {
R|<local>/s|.R|kotlin/String.length|
}
}
}
public final fun test_4(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
!=(R|<local>/s|?.{ $subj$.R|/check|() }, Boolean(false)) -> {
R|<local>/s|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
}
else -> {
R|<local>/s|.R|kotlin/String.length|
}
}
}