Pass GenerationState to generateClassSyntheticParts as it's more useful

This commit is contained in:
Yan Zhulanow
2015-03-10 21:07:07 +03:00
parent ab4d2788c2
commit 93ce3bc2ad
3 changed files with 6 additions and 4 deletions
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.codegen.ClassBuilderMode
import org.jetbrains.kotlin.codegen.FunctionCodegen
import org.jetbrains.kotlin.codegen.StackValue
import org.jetbrains.kotlin.codegen.extensions.ExpressionCodegenExtension
import org.jetbrains.kotlin.codegen.state.GenerationState
import org.jetbrains.kotlin.codegen.state.JetTypeMapper
import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.ClassKind
@@ -135,7 +136,7 @@ public class AndroidExpressionCodegenExtension : ExpressionCodegenExtension {
override fun generateClassSyntheticParts(
classBuilder: ClassBuilder,
bindingContext: BindingContext,
state: GenerationState,
classOrObject: JetClassOrObject,
descriptor: ClassDescriptor
) {
@@ -145,7 +146,7 @@ public class AndroidExpressionCodegenExtension : ExpressionCodegenExtension {
val androidClassType = getClassType(descriptor)
if (androidClassType == AndroidClassType.UNKNOWN) return
val classType = JetTypeMapper(bindingContext, ClassBuilderMode.FULL).mapClass(descriptor)
val classType = state.getTypeMapper().mapClass(descriptor)
val className = classType.getInternalName()
val viewType = Type.getObjectType("android/view/View")