Fix FunctionExpression
Change-Id: I03216b8e52057e3f3d665265959f66ae5cfa44df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
3a36c55fec
commit
cd770a6b59
|
@ -1774,7 +1774,7 @@ bool Codegen::visit(FunctionExpression *ast)
|
||||||
TempScope scope(_function);
|
TempScope scope(_function);
|
||||||
|
|
||||||
int function = defineFunction(ast->name.toString(), ast, ast->formals, ast->body ? ast->body->elements : 0);
|
int function = defineFunction(ast->name.toString(), ast, ast->formals, ast->body ? ast->body->elements : 0);
|
||||||
_expr.code = _block->CLOSURE(function);
|
_expr.result = Reference::fromClosure(this, function);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue