Skip to content

Commit

Permalink
Bug 1492074 - Syntax parse of dynamic module import syntax should fai…
Browse files Browse the repository at this point in the history
…l since this is not yet implemented r=jandem on a CLOSED TREE
  • Loading branch information
jonco3 committed Sep 18, 2018
1 parent 3b7081b commit 10ad45b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/frontend/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10597,6 +10597,10 @@ Parser<ParseHandler, CharT>::importExpr(YieldHandling yieldHandling)

MUST_MATCH_TOKEN_MOD(TokenKind::RightParen, TokenStream::Operand, JSMSG_PAREN_AFTER_ARGS);

if (!abortIfSyntaxParser()) {
return null();
}

return handler.newCallImport(importHolder, arg);
} else {
error(JSMSG_UNEXPECTED_TOKEN_NO_EXPECT, TokenKindToDesc(next));
Expand Down
6 changes: 6 additions & 0 deletions js/src/jit-test/tests/modules/dynamic-import-lazy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// |jit-test| error: SyntaxError

function lazyilyParsedFunction()
{
return import("/module1.js");
}

0 comments on commit 10ad45b

Please sign in to comment.