Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.txt
T
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00

24 lines
769 B
Plaintext
Vendored

FILE: smartcastAfterReassignment.kt
public final fun test_1(): R|kotlin/Unit| {
lvar x: R|kotlin/Any| = Int(1)
R|<local>/x| = String()
R|<local>/x|.R|kotlin/String.length|
}
public final fun test_2(): R|kotlin/Unit| {
lvar x: R|kotlin/String?| = Null(null)
when () {
==(R|<local>/x|, Null(null)) -> {
R|<local>/x| = String()
}
}
R|<local>/x|.R|kotlin/String.length|
}
public final fun test_3(): R|kotlin/Unit| {
lvar x: R|kotlin/String?| = Null(null)
R|<local>/x| = String()
R|<local>/x|.R|kotlin/String.length|
R|<local>/x| = Null(null)
R|<local>/x|.<Inapplicable(WRONG_RECEIVER): kotlin/String.length>#
}