mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
CHECKCAST is redundant if the corresponding static type exactly matches the target type. CHECKCAST instructions to-be-reified should not be eliminated. KT-14811 Unnecessary checkcast generated in parameterized functions KT-14963 unnecessary checkcast java/lang/Object
12 lines
187 B
Kotlin
Vendored
12 lines
187 B
Kotlin
Vendored
interface WorldObject {
|
|
val name: String
|
|
}
|
|
|
|
fun testB(worldObj: WorldObject) {
|
|
val y = worldObj.let {
|
|
println("object name: ${it.name}")
|
|
it
|
|
}
|
|
}
|
|
|
|
// 0 CHECKCAST |