You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: When running these examples, replace [\u2028] with the proper unicode character.
Issue
const foo=1[\u2028] throw new Error("bar")
produces
error: Uncaught (in promise) Error: bar
const foo=1 throw new Error("bar")
^
at file:///tmp/main.ts:1:19
with location 1:19.
Expected
It should match ECMAScript's specs, which denotes U+2028 and U+2029 as line terminators.
Node reports location 2:7 as well.
Works in eval
Both of these:
eval(`const foo=1[\u2028] throw new Error("bar")`)
eval(`const foo=1\u2028 throw new Error("bar")`)
produce
error: Uncaught (in promise) Error: bar
eval(`const foo=1 throw new Error("bar")`)
^
at eval (eval at <anonymous> (file:///tmp/main.ts:1:1), <anonymous>:2:7)
at file:///tmp/main.ts:1:1
with line number 2:7.
The text was updated successfully, but these errors were encountered:
Version: Deno 2.2.11
OS: Win11
Note: When running these examples, replace
[\u2028]
with the proper unicode character.Issue
produces
with location
1:19
.Expected
It should match ECMAScript's specs, which denotes
U+2028
andU+2029
as line terminators.Node reports location
2:7
as well.Works in eval
Both of these:
produce
with line number
2:7
.The text was updated successfully, but these errors were encountered: