Fixed KT-2071: Cannot Introduce Variable from function literal.
This commit is contained in:
@@ -50,6 +50,13 @@ public class JetPsiFactory {
|
||||
return property.getInitializer();
|
||||
}
|
||||
|
||||
public static JetValueArgumentList createCallArguments(Project project, String text) {
|
||||
JetProperty property = createProperty(project, "val x = foo" + text);
|
||||
JetExpression initializer = property.getInitializer();
|
||||
JetCallExpression callExpression = (JetCallExpression) initializer;
|
||||
return callExpression.getValueArgumentList();
|
||||
}
|
||||
|
||||
public static JetTypeReference createType(Project project, String type) {
|
||||
JetProperty property = createProperty(project, "val x : " + type);
|
||||
return property.getPropertyTypeRef();
|
||||
|
||||
Reference in New Issue
Block a user