no varargs support in frontend yet

This commit is contained in:
Dmitry Jemerov
2011-04-15 11:31:32 +02:00
parent 391da867bb
commit f7d00f2dec
@@ -11,6 +11,7 @@ import org.jetbrains.jet.parsing.JetParsingTest;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@@ -584,6 +585,12 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
assertEquals(expected, main.invoke(null, arg1, arg2)); assertEquals(expected, main.invoke(null, arg1, arg2));
} }
public void _testVarargs() throws Exception {
loadText("fun foo() = java.util.Arrays.asList(\"IntelliJ\", \"IDEA\")");
final Method main = generateFunction();
ArrayList arrayList = (ArrayList) main.invoke(null);
}
private void loadText(final String text) { private void loadText(final String text) {
myFixture.configureByText(JetFileType.INSTANCE, text); myFixture.configureByText(JetFileType.INSTANCE, text);
} }