Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
fun main() { val x: Int = 5 val y: Long = x println(y) }
fun
main
() {
val
x
:
Int
=
5
val
y
:
Long
=
x
println
(
y
)
}
demo_type_conv.kt:3:17: error: type mismatch: inferred type is Int but Long was expected
val y: Long = x
^