Fix VerifyError on bound function reference on generic property

Also add a test for obsolete KT-14755

 #KT-16929 Fixed
This commit is contained in:
Alexander Udalov
2017-03-23 17:38:26 +03:00
parent fc38479f48
commit fef4c8ccd8
7 changed files with 77 additions and 1 deletions
@@ -3365,7 +3365,8 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
KotlinType receiverExpressionType = expressionJetType(expression.getReceiverExpression());
Type receiverAsmType = receiverExpressionType != null ? asmType(receiverExpressionType) : null;
StackValue receiverValue = receiverExpressionType != null ? gen(expression.getReceiverExpression()) : null;
StackValue receiverValue =
receiverExpressionType != null ? StackValue.coercion(gen(expression.getReceiverExpression()), receiverAsmType) : null;
FunctionDescriptor functionDescriptor = bindingContext.get(FUNCTION, expression);
if (functionDescriptor != null) {