Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
ebcc2cc3b207156c1c0e90e5107aa356b8fa8d72
/
.
/
compiler
/
testData
/
codegen
/
box
/
inference
/
kt45118.kt
blob: 90ea5d62b3d972fb1cc1027cc0343ea1d6c806c0 [
file
]
open
class
Foo
(
open val x
:
Boolean
)
class
Bar
:
Foo
(
false
)
{
val y
=
"OK"
}
fun contract
(
x
:
Foo
)
=
x
val temp
=
if
(
true
)
contract
(
Bar
())
else
Bar
()
fun box
():
String
=
(
temp
as
Bar
).
y