Skip to content
Snippets Groups Projects
Commit b35b39c4 authored by Gorkem Yakin's avatar Gorkem Yakin
Browse files

Merge branch 'bocoup/module-code'

parents a5e8ac18 82abd59f
No related branches found
No related tags found
No related merge requests found
Showing
with 246 additions and 0 deletions
// 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;');
});
// 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";');
});
// 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;
// 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';
// 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; };
// 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; }
// 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; }
// 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; } }
// 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; } }
// 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; } }
// 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; } }
// 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; } });
// 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; } });
// 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; } });
// 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; } });
// 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)
// 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;
// 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;
// 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;
// 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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment