Files
kotlin/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt
Anton Sukhonosenko 0073257841 Fix for KT-10313: ClassCastException with Generics
#KT-10313 Fixed
2016-02-12 10:53:28 +03:00

7 lines
161 B
Kotlin
Vendored

class Box<T>(val value: T)
fun box() : String {
val b = Box<Long>(2 * 3)
val expected: Long? = 6L
return if (b.value == expected) "OK" else "fail"
}