Relates :
|
First time: parser throws SyntaxError jjs> Function("/a/r") <shell>:1 SyntaxError: <function>:1:4 Unsupported RegExp flag: r /a/r ^ Second time: silently succeeds jjs> Function("/a/r") function () { /a/r } Third time also silently succeeds; trying to invoke it now throws the error during invocation: jjs> var x = Function("/a/r") jjs> x() <function>:2 SyntaxError: Unsupported RegExp flag: r This seems inconsistent.
|