2021-04-30 04:28:12 +02:00
|
|
|
// Copyright (C) 2021 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
description: >
|
2023-09-13 11:35:06 +02:00
|
|
|
WithClause in ImportDeclaration may use a string literal as a key (delimited with U+0022)
|
2021-04-30 04:28:12 +02:00
|
|
|
esid: sec-modules
|
|
|
|
info: |
|
|
|
|
ImportDeclaration:
|
2023-09-13 11:35:06 +02:00
|
|
|
import ModuleSpecifier[no LineTerminator here] WithClause;
|
2021-04-30 04:28:12 +02:00
|
|
|
|
2023-09-13 11:35:06 +02:00
|
|
|
WithClause:
|
2021-04-30 04:28:12 +02:00
|
|
|
assert {}
|
2023-09-13 11:35:06 +02:00
|
|
|
assert {WithEntries ,opt}
|
2021-04-30 04:28:12 +02:00
|
|
|
|
2023-09-13 11:35:06 +02:00
|
|
|
WithEntries:
|
|
|
|
AttributeKey : StringLiteral
|
|
|
|
AttributeKey : StringLiteral , WithEntries
|
2021-04-30 04:28:12 +02:00
|
|
|
|
2023-09-13 11:35:06 +02:00
|
|
|
AttributeKey:
|
2021-04-30 04:28:12 +02:00
|
|
|
IdentifierName
|
|
|
|
StringLiteral
|
2023-09-13 11:35:06 +02:00
|
|
|
negative:
|
|
|
|
phase: resolution
|
|
|
|
type: SyntaxError
|
2021-04-30 04:28:12 +02:00
|
|
|
features: [import-assertions, globalThis]
|
|
|
|
flags: [module]
|
|
|
|
---*/
|
|
|
|
|
2023-09-13 11:35:06 +02:00
|
|
|
$DONOTEVALUATE();
|
|
|
|
|
2024-06-27 14:58:04 +02:00
|
|
|
import "../resources/ensure-linking-error_FIXTURE.js";
|
2023-09-13 11:35:06 +02:00
|
|
|
|
2021-04-30 04:28:12 +02:00
|
|
|
import x from './import-assertion-1_FIXTURE.js' assert {"test262\u0078":''};
|
|
|
|
import './import-assertion-2_FIXTURE.js' assert {"test262\u0078":''};
|
|
|
|
export * from './import-assertion-3_FIXTURE.js' assert {"test262\u0078":''};
|
|
|
|
|
|
|
|
assert.sameValue(x, 262.1);
|