annotate test/script/basic/funcconstructor.js.EXPECTED @ 315:295c91f5fdde

8015345: Function("}),print('test'),({") should throw SyntaxError Reviewed-by: lagergren, hannesw, jlaskey
author sundar
date Mon, 03 Jun 2013 15:58:14 +0530
parents da1e581c933b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
1 anon func
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
2 225
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
3 function (x) {
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
4 print('anon func'); return x*x;
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
5 }
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
6 syntax error? true
315
295c91f5fdde 8015345: Function("}),print('test'),({") should throw SyntaxError
sundar
parents: 2
diff changeset
7 SyntaxError: <function>:1:13 Missing close quote
2
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
8 print('hello)
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
9 ^
da1e581c933b 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
10 done