This commit is contained in:
Michael Bogdanov
2014-10-03 15:32:06 +04:00
parent 15043b3c6d
commit 609caa8159
@@ -3095,10 +3095,8 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
Type type = expressionType(expression.getBaseExpression()); Type type = expressionType(expression.getBaseExpression());
value.put(type, v); value.put(type, v);
invokeFunction(resolvedCall, StackValue.onStack(type)); StackValue result = invokeFunction(resolvedCall, StackValue.onStack(type));
value.store(result.type, v);
CallableMethod callableMethod = (CallableMethod) callable;
value.store(callableMethod.getReturnType(), v);
value.put(type, v); value.put(type, v);
return StackValue.onStack(type); return StackValue.onStack(type);
} }
@@ -3166,10 +3164,8 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
storeType = type; storeType = type;
} }
else { else {
Callable callable = resolveToCallable((FunctionDescriptor) op, false); StackValue result = invokeFunction(resolvedCall, StackValue.onStack(type));
invokeFunction(resolvedCall, StackValue.onStack(type)); storeType = result.type;
CallableMethod callableMethod = (CallableMethod) callable;
storeType = callableMethod.getReturnType();
} }
value.store(storeType, v); value.store(storeType, v);