use of org.eclipse.xtext.xbase.lib.Functions in project xtext-xtend by eclipse.
the class LinkingTest method testBug342848_01.
@Test
public void testBug342848_01() throws Exception {
String fileAsText = "import org.eclipse.xtext.xbase.lib.Functions\n" + "class Clazz { def void method(Functions$Function0<Integer> f) { f.apply } }";
XtendFile file = file(fileAsText, true);
XtendFunction function = (XtendFunction) ((XtendClass) file.getXtendTypes().get(0)).getMembers().get(0);
XtendParameter parameter = function.getParameters().get(0);
String identifier = parameter.getParameterType().getIdentifier();
assertEquals(Functions.Function0.class.getName() + "<java.lang.Integer>", identifier);
}
Aggregations