| Index: src/typing-asm.cc
|
| diff --git a/src/typing-asm.cc b/src/typing-asm.cc
|
| index 6e7b90ccd120f7a30d721b570d375d7d6979d927..b969d45166586ae35feb774bee642f6662c0e52a 100644
|
| --- a/src/typing-asm.cc
|
| +++ b/src/typing-asm.cc
|
| @@ -127,6 +127,9 @@ void AsmTyper::VisitAsmModule(FunctionLiteral* fun) {
|
|
|
| // Validate exports.
|
| ReturnStatement* stmt = fun->body()->last()->AsReturnStatement();
|
| + if (stmt == nullptr) {
|
| + FAIL(fun->body()->last(), "last statement in module is not a return");
|
| + }
|
| RECURSE(VisitWithExpectation(stmt->expression(), Type::Object(),
|
| "expected object export"));
|
| }
|
|
|