Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
6330def4271b547b5c7db5f9759e387de2908e94
/
.
/
compiler
/
testData
/
codegen
/
box
/
increment
/
postfixIncrementOnSmartCast.kt
blob: c6e47ab0e6d7cbe17c52285203daa456a931160a [
file
] [
log
] [
blame
]
fun box
()
:
String
{
var
i
:
Int
?
i
=
10
// Postfix increment on a smart cast should work
// Specific: i.inc() type is Int but i and j types are both Int?
val j
=
i
++
return
if
(
j
==
10
&&
11
==
i
)
"OK"
else
"fail j = $j i = $i"
}