Support collection literals in the JVM backend

This commit is contained in:
Mikhail Zarechenskiy
2017-03-20 20:51:38 +03:00
parent 859bccb9fc
commit 0f1acab40d
11 changed files with 304 additions and 0 deletions
@@ -2672,6 +2672,15 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
return invokeFunction(resolvedCall, receiver);
}
@Override
public StackValue visitCollectionLiteralExpression(
@NotNull KtCollectionLiteralExpression expression, StackValue data
) {
ResolvedCall<FunctionDescriptor> resolvedCall = bindingContext.get(COLLECTION_LITERAL_CALL, expression);
assert resolvedCall != null : "No resolved call for " + PsiUtilsKt.getTextWithLocation(expression);
return invokeFunction(resolvedCall, data);
}
@Nullable
private StackValue genSamInterfaceValue(
@NotNull KtExpression probablyParenthesizedExpression,