Skip to content

Commit fbd32fb

Browse files
authoredApr 15, 2024··
fix(es/parser): Fix span of BindingIdent (#8859)
**Related issue:** - Closes #8856
1 parent 739a92b commit fbd32fb

File tree

1,176 files changed

+12531
-12346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,176 files changed

+12531
-12346
lines changed
 

‎crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.1.normal.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
//! 7 | var f4 = <T>(x: T, x: T) => { }
7575
//! 8 |
7676
//! 9 | function foo2(x: string, x: number) { }
77-
//! : ^^^^|^^^^ ^^^^|^^^^
78-
//! : | `-- used as parameter more than once
79-
//! : `-- previous definition here
77+
//! : | |
78+
//! : | `-- used as parameter more than once
79+
//! : `-- previous definition here
8080
//! 10 | var f5 = function foo(x: string, x: number) { }
8181
//! 11 | var f6 = function (x: string, x: number) { }
8282
//! 12 | var f7 = (x: string, x: number) => { }
@@ -88,9 +88,9 @@
8888
//! 8 |
8989
//! 9 | function foo2(x: string, x: number) { }
9090
//! 10 | var f5 = function foo(x: string, x: number) { }
91-
//! : ^^^^|^^^^ ^^^^|^^^^
92-
//! : | `-- used as parameter more than once
93-
//! : `-- previous definition here
91+
//! : | |
92+
//! : | `-- used as parameter more than once
93+
//! : `-- previous definition here
9494
//! 11 | var f6 = function (x: string, x: number) { }
9595
//! 12 | var f7 = (x: string, x: number) => { }
9696
//! 13 | var f8 = <T>(x: T, y: T) => { }
@@ -102,9 +102,9 @@
102102
//! 9 | function foo2(x: string, x: number) { }
103103
//! 10 | var f5 = function foo(x: string, x: number) { }
104104
//! 11 | var f6 = function (x: string, x: number) { }
105-
//! : ^^^^|^^^^ ^^^^|^^^^
106-
//! : | `-- used as parameter more than once
107-
//! : `-- previous definition here
105+
//! : | |
106+
//! : | `-- used as parameter more than once
107+
//! : `-- previous definition here
108108
//! 12 | var f7 = (x: string, x: number) => { }
109109
//! 13 | var f8 = <T>(x: T, y: T) => { }
110110
//! `----
@@ -143,9 +143,9 @@
143143
//! 15 | class C {
144144
//! 16 | foo(x, x) { }
145145
//! 17 | foo2(x: number, x: string) { }
146-
//! : ^^^^|^^^^ ^^^^|^^^^
147-
//! : | `-- used as parameter more than once
148-
//! : `-- previous definition here
146+
//! : | |
147+
//! : | `-- used as parameter more than once
148+
//! : `-- previous definition here
149149
//! 18 | foo3<T>(x: T, x: T) { }
150150
//! 19 | }
151151
//! `----
@@ -156,9 +156,9 @@
156156
//! 16 | foo(x, x) { }
157157
//! 17 | foo2(x: number, x: string) { }
158158
//! 18 | foo3<T>(x: T, x: T) { }
159-
//! : ^^|^ ^^|^
160-
//! : | `-- used as parameter more than once
161-
//! : `-- previous definition here
159+
//! : | |
160+
//! : | `-- used as parameter more than once
161+
//! : `-- previous definition here
162162
//! 19 | }
163163
//! 20 |
164164
//! 21 | interface I {
@@ -184,9 +184,9 @@
184184
//! 34 | var b = {
185185
//! 35 | foo(x, x) { },
186186
//! 36 | a: function foo(x: number, x: string) { },
187-
//! : ^^^^|^^^^ ^^^^|^^^^
188-
//! : | `-- used as parameter more than once
189-
//! : `-- previous definition here
187+
//! : | |
188+
//! : | `-- used as parameter more than once
189+
//! : `-- previous definition here
190190
//! 37 | b: <T>(x: T, x: T) => { }
191191
//! 38 | }
192192
//! `----

‎crates/swc/tests/tsc-references/callSignaturesWithDuplicateParameters.2.minified.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
//! 7 | var f4 = <T>(x: T, x: T) => { }
7575
//! 8 |
7676
//! 9 | function foo2(x: string, x: number) { }
77-
//! : ^^^^|^^^^ ^^^^|^^^^
78-
//! : | `-- used as parameter more than once
79-
//! : `-- previous definition here
77+
//! : | |
78+
//! : | `-- used as parameter more than once
79+
//! : `-- previous definition here
8080
//! 10 | var f5 = function foo(x: string, x: number) { }
8181
//! 11 | var f6 = function (x: string, x: number) { }
8282
//! 12 | var f7 = (x: string, x: number) => { }
@@ -88,9 +88,9 @@
8888
//! 8 |
8989
//! 9 | function foo2(x: string, x: number) { }
9090
//! 10 | var f5 = function foo(x: string, x: number) { }
91-
//! : ^^^^|^^^^ ^^^^|^^^^
92-
//! : | `-- used as parameter more than once
93-
//! : `-- previous definition here
91+
//! : | |
92+
//! : | `-- used as parameter more than once
93+
//! : `-- previous definition here
9494
//! 11 | var f6 = function (x: string, x: number) { }
9595
//! 12 | var f7 = (x: string, x: number) => { }
9696
//! 13 | var f8 = <T>(x: T, y: T) => { }
@@ -102,9 +102,9 @@
102102
//! 9 | function foo2(x: string, x: number) { }
103103
//! 10 | var f5 = function foo(x: string, x: number) { }
104104
//! 11 | var f6 = function (x: string, x: number) { }
105-
//! : ^^^^|^^^^ ^^^^|^^^^
106-
//! : | `-- used as parameter more than once
107-
//! : `-- previous definition here
105+
//! : | |
106+
//! : | `-- used as parameter more than once
107+
//! : `-- previous definition here
108108
//! 12 | var f7 = (x: string, x: number) => { }
109109
//! 13 | var f8 = <T>(x: T, y: T) => { }
110110
//! `----
@@ -143,9 +143,9 @@
143143
//! 15 | class C {
144144
//! 16 | foo(x, x) { }
145145
//! 17 | foo2(x: number, x: string) { }
146-
//! : ^^^^|^^^^ ^^^^|^^^^
147-
//! : | `-- used as parameter more than once
148-
//! : `-- previous definition here
146+
//! : | |
147+
//! : | `-- used as parameter more than once
148+
//! : `-- previous definition here
149149
//! 18 | foo3<T>(x: T, x: T) { }
150150
//! 19 | }
151151
//! `----
@@ -156,9 +156,9 @@
156156
//! 16 | foo(x, x) { }
157157
//! 17 | foo2(x: number, x: string) { }
158158
//! 18 | foo3<T>(x: T, x: T) { }
159-
//! : ^^|^ ^^|^
160-
//! : | `-- used as parameter more than once
161-
//! : `-- previous definition here
159+
//! : | |
160+
//! : | `-- used as parameter more than once
161+
//! : `-- previous definition here
162162
//! 19 | }
163163
//! 20 |
164164
//! 21 | interface I {
@@ -184,9 +184,9 @@
184184
//! 34 | var b = {
185185
//! 35 | foo(x, x) { },
186186
//! 36 | a: function foo(x: number, x: string) { },
187-
//! : ^^^^|^^^^ ^^^^|^^^^
188-
//! : | `-- used as parameter more than once
189-
//! : `-- previous definition here
187+
//! : | |
188+
//! : | `-- used as parameter more than once
189+
//! : `-- previous definition here
190190
//! 37 | b: <T>(x: T, x: T) => { }
191191
//! 38 | }
192192
//! `----

0 commit comments

Comments
 (0)
Please sign in to comment.