" f := func() int {\n" +
" return 3\n" +
" };\n" +
"}"));
GoLiteralFunction lit =
getAs(GoLiteralFunction.class,
castAs(GoLiteralExpression.class, 0,
castAs(GoShortVarDeclaration.class, 0,
get(
childAt(0,
file.getFunctions()
).getBlock()
).getStatements()
).getExpressions()
).getLiteral());
assertNotNull(lit.getResults());
assertNotNull(lit.getParameters());
assertNotNull(lit.getBlock());
assertEquals("int", castAs(GoFunctionParameter.class, 0, lit.getResults()).getText());
}