Version
v22.9.0
Platform
Microsoft Windows NT 10.0.19044.0 x64
Subsystem
No response
What steps will reproduce the bug?
❯node--enable-experimental-regexp-engineWelcometoNode.jsv22.9.0.Type".help"formoreinformation.>/foo/l/foo/l>(()=>/foo/l)()/foo/l>await/foo/lUncaught SyntaxError:
await/foo/l^Invalidregularexpressionflag>await(async()=>/foo/l)()Uncaught SyntaxError:
await(async()=>/foo/l)()^Invalidregularexpressionflag>await(function(){return/foo/l})()Uncaught SyntaxError:
await(function(){return/foo/l})()^Invalidregularexpressionflag>awaitnewPromise(resolve=>resolve(/foo/l))Uncaught SyntaxError:
awaitnewPromise(resolve=>resolve(/foo/l))^Invalidregularexpressionflag>awaitPromise.resolve(/foo/l)Uncaught SyntaxError:
awaitPromise.resolve(/foo/l)^InvalidregularexpressionflagHow often does it reproduce? Is there a required condition?
The linear regex must be created, and wrapped in a Promise, closures experience no such issues.
What is the expected behavior? Why is that the expected behavior?
The linear flag should be parsed and executed as expected.
What do you see instead?
Invalid regular expression flag
Additional information
No response
Version
v22.9.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
The linear regex must be created, and wrapped in a Promise, closures experience no such issues.
What is the expected behavior? Why is that the expected behavior?
The linear flag should be parsed and executed as expected.
What do you see instead?
Invalid regular expression flagAdditional information
No response