diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc index c50f44a2a2..f6cdb60205 100644 --- a/src/compiler/typer.cc +++ b/src/compiler/typer.cc @@ -1217,7 +1217,7 @@ Type* Typer::Visitor::TypeJSCreateArray(Node* node) { Type* Typer::Visitor::TypeJSCreateClosure(Node* node) { - return Type::OtherObject(); + return Type::Function(); } diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc index 1e7d8747a7..ff79140233 100644 --- a/src/compiler/verifier.cc +++ b/src/compiler/verifier.cc @@ -516,7 +516,7 @@ void Verifier::Visitor::Check(Node* node) { break; case IrOpcode::kJSCreateClosure: // Type is Function. - CheckUpperIs(node, Type::OtherObject()); + CheckUpperIs(node, Type::Function()); break; case IrOpcode::kJSCreateLiteralArray: case IrOpcode::kJSCreateLiteralObject: