Debian Codegraph @

js/src/tests/test262/language/global-code/return.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-scripts
6 es6id: 15.1
7 description: ReturnStatement may not be used directly within global code
8 info: |
9 Syntax
10
11 Script :
12 ScriptBodyopt
13
14 ScriptBody :
15 StatementList[~Yield, ~Return]
16 negative:
17 phase: parse
18 type: SyntaxError
19 ---*/
20
21 $DONOTEVALUATE();
22
23 return;