mirror of https://github.com/tc39/test262.git
Merge branch 'bocoup/module-code'
This commit is contained in:
commit
b35b39c4aa
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: The `export` declaration may not appear within eval code
|
||||
id: sec-scripts
|
||||
flags: [module]
|
||||
info: |
|
||||
Eval code is the source text supplied to the built-in eval function. More
|
||||
precisely, if the parameter to the built-in eval function is a String, it
|
||||
is treated as an ECMAScript Script. The eval code for a particular
|
||||
invocation of eval is the global code portion of that Script.
|
||||
|
||||
A.5 Scripts and Modules
|
||||
|
||||
Script:
|
||||
ScriptBodyopt
|
||||
|
||||
ScriptBody:
|
||||
StatementList
|
||||
---*/
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval('export default null;');
|
||||
});
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: The `import` declaration may not appear within eval code
|
||||
id: sec-scripts
|
||||
flags: [module]
|
||||
info: |
|
||||
Eval code is the source text supplied to the built-in eval function. More
|
||||
precisely, if the parameter to the built-in eval function is a String, it
|
||||
is treated as an ECMAScript Script. The eval code for a particular
|
||||
invocation of eval is the global code portion of that Script.
|
||||
|
||||
A.5 Scripts and Modules
|
||||
|
||||
Script:
|
||||
ScriptBodyopt
|
||||
|
||||
ScriptBody:
|
||||
StatementList
|
||||
---*/
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval('import v from "./import.js";');
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: The `export` declaration may not appear within a ScriptBody
|
||||
id: sec-scripts
|
||||
negative: SyntaxError
|
||||
info: |
|
||||
A.5 Scripts and Modules
|
||||
|
||||
Script:
|
||||
ScriptBodyopt
|
||||
|
||||
ScriptBody:
|
||||
StatementList
|
||||
---*/
|
||||
|
||||
export default null;
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: The `import` declaration may not appear within a ScriptBody
|
||||
id: sec-scripts
|
||||
negative: SyntaxError
|
||||
info: |
|
||||
A.5 Scripts and Modules
|
||||
|
||||
Script:
|
||||
ScriptBodyopt
|
||||
|
||||
ScriptBody:
|
||||
StatementList
|
||||
---*/
|
||||
|
||||
import v from './import.js';
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
() => { export default null; };
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
{ void 0; export default null; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
{ export default null; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { static method() { export default null; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { method() { export default null; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { static *method() { export default null; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { *method() { export default null; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { static *method() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { *method() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { static method() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { method() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
do export default null; while (false)
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const x = 0; false;)
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const y in [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let y in [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (y in [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var y in [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let x = 0; false;)
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (x = 0; false;)
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const y of [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let y of [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (y of [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var y of [])
|
||||
export default null;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var x = 0; false;)
|
||||
export default null;
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
function f() { export default null; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(function() { export default null; });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
function* g() { export default null; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(function*() { export default null; });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
if (true) { } else export default null;
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
if (false) export default null;
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
test262: export default null;
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ *m() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ get m() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ m() { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ set m(x) { export default null; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { case 1: export default null; default: }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { case 1: export default null; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { default: export default null; }
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } catch (err) { } finally {
|
||||
export default null;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } catch (err) {
|
||||
export default null;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } finally {
|
||||
export default null;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try {
|
||||
export default null;
|
||||
} catch (err) { }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `export` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
while (false) export default null;
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
() => { import v from './decl-pos-import-arrow-function.js'; };
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
{ void 0; import v from './decl-pos-import-block-stmt-list.js'; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
{ import v from './decl-pos-import-block-stmt.js'; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { static method() { import v from './decl-pos-import-class-decl-meth-static.js'; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { method() { import v from './decl-pos-import-class-decl-meth.js'; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { static *method() { import v from './decl-pos-import-class-decl-method-gen-static.js'; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
class C { *method() { import v from './decl-pos-import-class-decl-method-gen.js'; } }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { static *method() { import v from './decl-pos-import-class-expr-meth-gen-static.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { *method() { import v from './decl-pos-import-class-expr-meth-gen.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { static method() { import v from './decl-pos-import-class-expr-meth-static.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(class { method() { import v from './decl-pos-import-class-expr-meth.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
do import v from './decl-pos-import-do-while.js'; while (false)
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const x = 0; false;)
|
||||
import v from './decl-pos-import-for-const.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const y in [])
|
||||
import v from './decl-pos-import-for-in-const.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let y in [])
|
||||
import v from './decl-pos-import-for-in-let.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (y in [])
|
||||
import v from './decl-pos-import-for-in-lhs.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var y in [])
|
||||
import v from './decl-pos-import-for-in-var.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let x = 0; false;)
|
||||
import v from './decl-pos-import-for-let.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (x = 0; false;)
|
||||
import v from './decl-pos-import-for-lhs.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (const y of [])
|
||||
import v from './decl-pos-import-for-of-const.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (let y of [])
|
||||
import v from './decl-pos-import-for-of-let.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (y of [])
|
||||
import v from './decl-pos-import-for-of-lhs.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var y of [])
|
||||
import v from './decl-pos-import-for-of-var.js';
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
for (var x = 0; false;)
|
||||
import v from './decl-pos-import-for-var.js';
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
function f() { import v from './decl-pos-import-function-decl.js'; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(function() { import v from './decl-pos-import-function-expr.js'; });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
function* g() { import v from './decl-pos-import-generator-decl.js'; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
(function*() { import v from './decl-pos-import-generator-expr.js'; });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
if (true) { } else import v from './decl-pos-import-if-else.js';
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
if (false) import v from './decl-pos-import-if-if.js';
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
test262: import v from './decl-pos-import-labeled.js';
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ *m() { import v from './decl-pos-import-object-gen-method.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ get m() { import v from './decl-pos-import-object-getter.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ m() { import v from './decl-pos-import-object-method.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Expression cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
({ set m(x) { import v from './decl-pos-import-object-setter.js'; } });
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { case 1: import v from './decl-pos-import-switch-case-dflt.js'; default: }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { case 1: import v from './decl-pos-import-switch-case.js'; }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
switch(0) { default: import v from './decl-pos-import-switch-dftl.js'; }
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } catch (err) { } finally {
|
||||
import v from './decl-pos-import-try-catch-finally.js';
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } catch (err) {
|
||||
import v from './decl-pos-import-try-catch.js';
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try { } finally {
|
||||
import v from './decl-pos-import-try-finally.js';
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
try {
|
||||
import v from './decl-pos-import-try-try.js';
|
||||
} catch (err) { }
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Statement cannot contain an `import` declaration
|
||||
id: sec-modules
|
||||
negative: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
while (false) import v from './decl-pos-import-while.js';
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
description: Module code is always strict mode code.
|
||||
es6id: 10.2.1
|
||||
id: sec-strict-mode-code
|
||||
flags: [module]
|
||||
negative: SyntaxError
|
||||
---*/
|
||||
|
||||
$ERROR('This statement should not be executed.');
|
||||
var public;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
id: sec-reserved-words
|
||||
es6id: 11.6.2
|
||||
description: The `await` token is not permitted as an identifier in module code
|
||||
flags: [module]
|
||||
negative: SyntaxError
|
||||
---*/
|
||||
|
||||
var await;
|
|
@ -0,0 +1,9 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
id: sec-reserved-words
|
||||
es6id: 11.6.2
|
||||
description: The `await` token is permitted as an identifier in script code
|
||||
---*/
|
||||
|
||||
var await;
|
Loading…
Reference in New Issue