Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 62e03631856b6a82935593f57c604d446a865c2e..33934c23fdf58a4ddc61bbb9880cedc4c8ca294e 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -1356,6 +1356,13 @@ void* Parser::ParseModuleItemList(ZoneList<Statement*>* body, bool* ok) { |
// incremented after parsing is done. |
++use_counts_[v8::Isolate::kUseAsm]; |
scope_->SetAsmModule(); |
+ // Check "use types". |
+ } else if (allow_harmony_types() && |
+ literal->raw_value()->AsString() == |
+ ast_value_factory()->use_types_string() && |
+ token_loc.end_pos - token_loc.beg_pos == |
+ ast_value_factory()->use_types_string()->length() + 2) { |
+ scope_->SetTyped(); |
} |
} else { |
// End of the directive prologue. |