FIR DFA: add more called-in-place tests
This commit is contained in:
@@ -13,7 +13,7 @@ fun atLeastOnce(x: () -> Unit) {
|
||||
}
|
||||
|
||||
fun exactlyOnce(x: () -> Unit) {
|
||||
contract { callsInPlace(x, InvocationKind.AT_LEAST_ONCE) }
|
||||
contract { callsInPlace(x, InvocationKind.EXACTLY_ONCE) }
|
||||
x()
|
||||
}
|
||||
|
||||
@@ -30,6 +30,14 @@ fun test1() {
|
||||
x.<!UNRESOLVED_REFERENCE!>inc<!>()
|
||||
}
|
||||
|
||||
fun test1m() {
|
||||
var x: Any?
|
||||
x = ""
|
||||
x.length
|
||||
unknown { x = "" }
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
var x: Any?
|
||||
x = ""
|
||||
|
||||
Reference in New Issue
Block a user