зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1492074 - Syntax parse of dynamic module import syntax should fail since this is not yet implemented r=jandem on a CLOSED TREE
--HG-- extra : source : a73bc1d129c77dc783446a7a88854b087272ddf7 extra : amend_source : 35fb6ede6425136ba8549d3e8ea5c45615fb47c2
This commit is contained in:
Родитель
21be148b05
Коммит
21e165d432
|
@ -10919,6 +10919,10 @@ GeneralParser<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));
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// |jit-test| error: SyntaxError
|
||||
|
||||
function lazyilyParsedFunction()
|
||||
{
|
||||
return import("/module1.js");
|
||||
}
|
|
@ -1,8 +1,3 @@
|
|||
[dynamic-imports-fetch-error.sub.html]
|
||||
expected: ERROR
|
||||
[import(): error cases occuring during fetching]
|
||||
expected: FAIL
|
||||
|
||||
[import() must reject when there is a wrong MIME type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
[dynamic-imports-script-error.html]
|
||||
expected: ERROR
|
||||
[import(): error cases caused by the imported module script]
|
||||
expected: FAIL
|
||||
|
||||
[import() must reject when there is a parse error]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче