new Identifier(unk, "f"),
Arrays.asList(
new FormalParam(new Identifier(unk, "x")),
new FormalParam(
SyntheticNodes.s(new Identifier(unk, "y___")))),
new Block(
unk,
Arrays.<Statement>asList(new ReturnStmt(
unk,
Operation.createInfix(
Operator.MULTIPLICATION,
Operation.createInfix(
Operator.ADDITION,
new Reference(new Identifier(unk, "x")),
new Reference(SyntheticNodes.s(
new Identifier(unk, "y___")))),
new Reference(new Identifier(unk, "z")))))));
checkSucceeds(
new Block(
unk,
Arrays.asList(
new FunctionDeclaration((FunctionConstructor) fc.clone()))),
js(fromString(
""
// x and y___ are formals, but z is free to the function.
+ "var dis___ = IMPORTS___;"
+ "{"
+ " function f(x, y___) {"
+ " return (x + y___) *"
+ " (IMPORTS___.z_v___ ?"
+ " IMPORTS___.z :"
+ " ___.ri(IMPORTS___, 'z'));"
+ " }"
+ " IMPORTS___.w___('f', ___.f(f, 'f'));"
+ "}")));
SyntheticNodes.s(fc);
checkSucceeds(
new Block(
unk,
Arrays.asList(
new FunctionDeclaration((FunctionConstructor) fc.clone()))),
js(fromString(
""