Adding type arguments if necessary.

#KT-2637 in progress
This commit is contained in:
Evgeny Gerashchenko
2013-07-11 15:46:23 +04:00
parent 99bfd6d477
commit 0367f1836d
22 changed files with 284 additions and 11 deletions
@@ -61,6 +61,13 @@ public class JetPsiFactory {
return callExpression.getValueArgumentList();
}
public static JetTypeArgumentList createTypeArguments(Project project, String text) {
JetProperty property = createProperty(project, "val x = foo" + text + "()");
JetExpression initializer = property.getInitializer();
JetCallExpression callExpression = (JetCallExpression) initializer;
return callExpression.getTypeArgumentList();
}
public static JetTypeReference createType(Project project, String type) {
JetProperty property = createProperty(project, "val x : " + type);
return property.getTypeRef();