Android Extensions: Generate proper receiver for clearFindViewByIdCache() call (KT-19742)

This commit is contained in:
Yan Zhulanow
2017-08-23 19:25:29 +03:00
committed by Yan Zhulanow
parent f84df6381e
commit 07be1e9d10
5 changed files with 20 additions and 9 deletions
@@ -103,11 +103,12 @@ abstract class AbstractAndroidExtensionsExpressionCodegenExtension : ExpressionC
}
if (containerOptions.containerType == AndroidContainerType.UNKNOWN) return null
val actualReceiver = StackValue.receiver(resolvedCall, receiver, c.codegen, null)
return StackValue.functionCall(Type.VOID_TYPE) {
val bytecodeClassName = c.typeMapper.mapType(container).internalName
receiver.put(c.typeMapper.mapType(container), it)
actualReceiver.put(c.typeMapper.mapType(container), it)
it.invokevirtual(bytecodeClassName, CLEAR_CACHE_METHOD_NAME, "()V", false)
}
}