-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
207 additions
and
416 deletions.
There are no files selected for viewing
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor1(target=es2015).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor1.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | accessor b = 1; | ||
//! 5 | static accessor c: any; | ||
//! 6 | static accessor d = 2; | ||
//! `---- | ||
class C1 { | ||
accessor a; | ||
accessor b = 1; | ||
static accessor c; | ||
static accessor d = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor1(target=es2015).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor1.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | accessor b = 1; | ||
//! 5 | static accessor c: any; | ||
//! 6 | static accessor d = 2; | ||
//! `---- |
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor1(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor1.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | accessor b = 1; | ||
//! 5 | static accessor c: any; | ||
//! 6 | static accessor d = 2; | ||
//! `---- | ||
class C1 { | ||
accessor a; | ||
accessor b = 1; | ||
static accessor c; | ||
static accessor d = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor1(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor1.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | accessor b = 1; | ||
//! 5 | static accessor c: any; | ||
//! 6 | static accessor d = 2; | ||
//! `---- |
35 changes: 24 additions & 11 deletions
35
crates/swc/tests/tsc-references/autoAccessor10.1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
//// [autoAccessor10.ts] | ||
//! | ||
//! x Unexpected token `a0`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a0 = 1; | ||
//! : ^^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 { | ||
//! `---- | ||
class C1 { | ||
accessor a0 = 1; | ||
} | ||
class C2 { | ||
#a1_accessor_storage = 1; | ||
accessor a1 = 2; | ||
} | ||
class C3 { | ||
static #a2_accessor_storage = 1; | ||
static{ | ||
class C3_Inner { | ||
accessor a2 = 2; | ||
static{ | ||
#a2_accessor_storage in C3; | ||
} | ||
} | ||
} | ||
} | ||
class C4_1 { | ||
static accessor a3 = 1; | ||
} | ||
class C4_2 { | ||
static accessor a3 = 1; | ||
} |
15 changes: 4 additions & 11 deletions
15
crates/swc/tests/tsc-references/autoAccessor10.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
//// [autoAccessor10.ts] | ||
//! | ||
//! x Unexpected token `a0`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a0 = 1; | ||
//! : ^^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 { | ||
//! `---- | ||
class C3 { | ||
static #a2_accessor_storage = 1; | ||
static{} | ||
} |
25 changes: 14 additions & 11 deletions
25
crates/swc/tests/tsc-references/autoAccessor2(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
//// [autoAccessor2.ts] | ||
//! | ||
//! x Unexpected token `#`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor #a: any; | ||
//! : ^ | ||
//! 4 | accessor #b = 1; | ||
//! 5 | static accessor #c: any; | ||
//! 6 | static accessor #d = 2; | ||
//! `---- | ||
class C1 { | ||
accessor #a; | ||
accessor #b = 1; | ||
static accessor #c; | ||
static accessor #d = 2; | ||
constructor(){ | ||
this.#a = 3; | ||
this.#b = 4; | ||
} | ||
static{ | ||
this.#c = 5; | ||
this.#d = 6; | ||
} | ||
} |
23 changes: 12 additions & 11 deletions
23
crates/swc/tests/tsc-references/autoAccessor2(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
//// [autoAccessor2.ts] | ||
//! | ||
//! x Unexpected token `#`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor #a: any; | ||
//! : ^ | ||
//! 4 | accessor #b = 1; | ||
//! 5 | static accessor #c: any; | ||
//! 6 | static accessor #d = 2; | ||
//! `---- | ||
class C1 { | ||
accessor #a; | ||
accessor #b = 1; | ||
static accessor #c; | ||
static accessor #d = 2; | ||
constructor(){ | ||
this.#a = 3, this.#b = 4; | ||
} | ||
static{ | ||
this.#c = 5, this.#d = 6; | ||
} | ||
} |
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor3(target=es2015).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor3.ts] | ||
//! | ||
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor "w": any; | ||
//! : ^^^ | ||
//! 4 | accessor "x" = 1; | ||
//! 5 | static accessor "y": any; | ||
//! 6 | static accessor "z" = 2; | ||
//! `---- | ||
class C1 { | ||
accessor "w"; | ||
accessor "x" = 1; | ||
static accessor "y"; | ||
static accessor "z" = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor3(target=es2015).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor3.ts] | ||
//! | ||
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor "w": any; | ||
//! : ^^^ | ||
//! 4 | accessor "x" = 1; | ||
//! 5 | static accessor "y": any; | ||
//! 6 | static accessor "z" = 2; | ||
//! `---- |
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor3(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor3.ts] | ||
//! | ||
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor "w": any; | ||
//! : ^^^ | ||
//! 4 | accessor "x" = 1; | ||
//! 5 | static accessor "y": any; | ||
//! 6 | static accessor "z" = 2; | ||
//! `---- | ||
class C1 { | ||
accessor "w"; | ||
accessor "x" = 1; | ||
static accessor "y"; | ||
static accessor "z" = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor3(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor3.ts] | ||
//! | ||
//! x Unexpected token `string literal (w, "w")`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor "w": any; | ||
//! : ^^^ | ||
//! 4 | accessor "x" = 1; | ||
//! 5 | static accessor "y": any; | ||
//! 6 | static accessor "z" = 2; | ||
//! `---- |
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor4(target=es2015).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor4.ts] | ||
//! | ||
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor 0: any; | ||
//! : ^ | ||
//! 4 | accessor 1 = 1; | ||
//! 5 | static accessor 2: any; | ||
//! 6 | static accessor 3 = 2; | ||
//! `---- | ||
class C1 { | ||
accessor 0; | ||
accessor 1 = 1; | ||
static accessor 2; | ||
static accessor 3 = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor4(target=es2015).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor4.ts] | ||
//! | ||
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor 0: any; | ||
//! : ^ | ||
//! 4 | accessor 1 = 1; | ||
//! 5 | static accessor 2: any; | ||
//! 6 | static accessor 3 = 2; | ||
//! `---- |
17 changes: 6 additions & 11 deletions
17
crates/swc/tests/tsc-references/autoAccessor4(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
//// [autoAccessor4.ts] | ||
//! | ||
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor 0: any; | ||
//! : ^ | ||
//! 4 | accessor 1 = 1; | ||
//! 5 | static accessor 2: any; | ||
//! 6 | static accessor 3 = 2; | ||
//! `---- | ||
class C1 { | ||
accessor 0; | ||
accessor 1 = 1; | ||
static accessor 2; | ||
static accessor 3 = 2; | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor4(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor4.ts] | ||
//! | ||
//! x Unexpected token `numeric literal (0, 0)`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor 0: any; | ||
//! : ^ | ||
//! 4 | accessor 1 = 1; | ||
//! 5 | static accessor 2: any; | ||
//! 6 | static accessor 3 = 2; | ||
//! `---- |
22 changes: 11 additions & 11 deletions
22
crates/swc/tests/tsc-references/autoAccessor6(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
//// [autoAccessor6.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 extends C1 { | ||
//! `---- | ||
class C1 { | ||
accessor a; | ||
} | ||
class C2 extends C1 { | ||
a = 1; | ||
} | ||
class C3 extends C1 { | ||
get a() { | ||
return super.a; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor6(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor6.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 extends C1 { | ||
//! `---- |
22 changes: 11 additions & 11 deletions
22
crates/swc/tests/tsc-references/autoAccessor7(target=es2022).1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
//// [autoAccessor7.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | abstract class C1 { | ||
//! 3 | abstract accessor a: any; | ||
//! : ^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 extends C1 { | ||
//! `---- | ||
class C1 { | ||
accessor a; | ||
} | ||
class C2 extends C1 { | ||
accessor a = 1; | ||
} | ||
class C3 extends C1 { | ||
get a() { | ||
return 1; | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
crates/swc/tests/tsc-references/autoAccessor7(target=es2022).2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
//// [autoAccessor7.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | abstract class C1 { | ||
//! 3 | abstract accessor a: any; | ||
//! : ^ | ||
//! 4 | } | ||
//! 5 | | ||
//! 6 | class C2 extends C1 { | ||
//! `---- |
21 changes: 11 additions & 10 deletions
21
crates/swc/tests/tsc-references/autoAccessor8.1.normal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
//// [autoAccessor8.ts] | ||
//! | ||
//! x Unexpected token `a`. Expected * for generator, private key, identifier or async | ||
//! ,-[1:1] | ||
//! 1 | | ||
//! 2 | class C1 { | ||
//! 3 | accessor a: any; | ||
//! : ^ | ||
//! 4 | static accessor b: any; | ||
//! 5 | } | ||
//! `---- | ||
class C1 { | ||
accessor a; | ||
static accessor b; | ||
} | ||
function f() { | ||
class C3 { | ||
accessor a; | ||
static accessor b; | ||
} | ||
return C3; | ||
} |
Oops, something went wrong.