Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
fae15b3fc4205675bfb51513d6068f83490926d3
/
.
/
compiler
/
testData
/
codegen
/
box
/
increment
/
postfixIncrementOnClassSmartCast.kt
blob: ffc56dd2b882cbea70ecf296657f0a095154a1b7 [
file
] [
log
] [
blame
]
open
class
Base
class
Derived
:
Base
()
operator
fun
Derived
.
inc
():
Derived
{
return
Derived
()
}
fun box
()
:
String
{
var
i
:
Base
i
=
Derived
()
val j
=
i
++
return
if
(
j
is
Derived
&&
i
is
Derived
)
"OK"
else
"fail j = $j i = $i"
}