nashorn/test/script/basic/funcconstructor.js.EXPECTED
author sundar
Thu, 09 Jan 2014 19:23:34 +0530
changeset 22379 5181d08e3440
parent 17973 d220c8157f25
permissions -rw-r--r--
8031359: Invocable.getInterface() works incorrectly if interface has default methods Reviewed-by: attila, hannesw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     1
anon func
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     2
225
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
function (x) {
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     4
print('anon func'); return x*x;
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
}
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
syntax error? true
17973
d220c8157f25 8015345: Function("}),print('test'),({") should throw SyntaxError
sundar
parents: 16147
diff changeset
     7
SyntaxError: <function>:1:13 Missing close quote
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
print('hello)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
             ^
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
done