Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
073a50037049a4e0869085bf4acf7c29e56210e3
/
.
/
compiler
/
testData
/
codegen
/
box
/
increment
/
postfixIncrementOnSmartCast.kt
blob: 3da28a2d6e67ce27eeb1652c8631c51c8f072efb [
file
] [
log
] [
blame
]
public
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"
}