Youssef Shoaib [MOD]
11/16/2024, 6:07 PMBen Woodworth
11/16/2024, 7:30 PMYoussef Shoaib [MOD]
11/16/2024, 7:34 PMephemient
11/16/2024, 9:38 PM// AT_MOST_ONCE
val x: Int
f { x = 1 }
// AT_LEAST_ONCE
var x: Int
f { x = 1 }
println(x)
// EXACTLY_ONCE
val x: Int
f { x = 1 }
println(x)
because that's the only reason I can see for them to existephemient
11/16/2024, 9:43 PMUNKNOWN
, I'd expect
// callsInPlace(block, any())
var x: Any? = null
f { x = 1 }
if (x is Int) {
// x can be smart-cast because it won't change again
to work, although in practice that seems more fragile to other conditions