Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/notIsNullOrEmpty.fir.txt
T
Tianyu Geng 6a03f31e50 FIR: add UnsafeCall resolution diagnostics
Previously unsafe call is reported as part of InapplicableWrongReceiver.
This makes it difficult for the downstream checkers to report different
diagnostics.
2021-04-19 15:11:13 +03:00

21 lines
631 B
Plaintext
Vendored

FILE: notIsNullOrEmpty.kt
public final fun test_1(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
R|<local>/s|.R|kotlin/text/isNullOrEmpty|().R|kotlin/Boolean.not|() -> {
R|<local>/s|.R|kotlin/String.length|
}
}
}
public final fun test_2(s: R|kotlin/String?|): R|kotlin/Unit| {
when () {
R|<local>/s|.R|kotlin/text/isNullOrEmpty|() -> {
R|<local>/s|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
}
else -> {
R|<local>/s|.R|kotlin/String.length|
}
}
}