Debian Codegraph @

js/src/tests/test262/language/asi/S7.9.2_A1_T4.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: Check examples for automatic semicolon insertion from the standard
6 es5id: 7.9.2_A1_T4
7 description: >
8 return \n a+b is a valid sentence in the ECMAScript grammar with
9 automatic semicolon insertion, but returned undefined
10 ---*/
11
12 //CHECK#1
13 var a=1,b=2;
14 function test(){
15 return
16 a+b
17 }
18 var x=test();
19 if (x!==undefined) throw new Test262Error('#1: Automatic semicolon insertion not work with return');
20
21 reportCompare(0, 0);