generate correct bytecode for constructors using infix call syntax

#KT-4589 Fixed
This commit is contained in:
Dmitry Jemerov
2015-03-04 19:18:08 +01:00
parent ed4c265564
commit 1188be9070
3 changed files with 25 additions and 0 deletions
@@ -2912,6 +2912,10 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
ResolvedCall<?> resolvedCall = getResolvedCallWithAssert(expression, bindingContext);
FunctionDescriptor descriptor = (FunctionDescriptor) resolvedCall.getResultingDescriptor();
if (descriptor instanceof ConstructorDescriptor) {
return generateConstructorCall(resolvedCall, expressionType(expression));
}
Callable callable = resolveToCallable(descriptor, false);
if (callable instanceof IntrinsicMethod) {
Type returnType = typeMapper.mapType(descriptor);