Files
kotlin/plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleFragmentProperty/simpleFragmentProperty.kt
Dmitry Petrov a087ea559f Eliminate redundant CHECKCAST instructions
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
2017-03-13 09:04:31 +03:00

20 lines
502 B
Kotlin
Vendored

package test
import android.app.Activity
import android.app.Fragment
import android.os.Bundle
import java.io.File
import kotlinx.android.synthetic.main.layout.*
public class MyActivity : Activity() {
init { fragm }
}
public class MyFragment : Fragment() {
init { fragm }
}
// 1 INVOKEVIRTUAL android/app/Activity\.getFragmentManager
// 1 INVOKEVIRTUAL android/app/Fragment\.getFragmentManager
// 2 GETSTATIC test/R\$id\.fragm
// 2 INVOKEVIRTUAL android/app/FragmentManager\.findFragmentById