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
868 changed files
with
9,932 additions
and
3,558 deletions.
There are no files selected for viewing
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,7 +1,11 @@ | ||
//// [1.0lib-noErrors.ts] | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! ,-[27:1] | ||
//! 27 | * @param x A String value that contains valid JavaScript code. | ||
//! 28 | */ | ||
//! 29 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! 30 | | ||
//! 31 | /** | ||
//! `---- |
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,7 +1,11 @@ | ||
//// [1.0lib-noErrors.ts] | ||
//! | ||
//! x 'eval' and 'arguments' cannot be used as a binding identifier in strict mode | ||
//! ,---- | ||
//! ,-[27:1] | ||
//! 27 | * @param x A String value that contains valid JavaScript code. | ||
//! 28 | */ | ||
//! 29 | declare function eval(x: string): any; | ||
//! : ^^^^ | ||
//! 30 | | ||
//! 31 | /** | ||
//! `---- |
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,7 +1,11 @@ | ||
//// [ES5For-of20.ts] | ||
//! | ||
//! x 'const' declarations must be initialized | ||
//! ,---- | ||
//! 4 | const v; | ||
//! : ^ | ||
//! ,-[2:1] | ||
//! 2 | let v; | ||
//! 3 | for (let v of [v]) { | ||
//! 4 | const v; | ||
//! : ^ | ||
//! 5 | } | ||
//! 6 | } | ||
//! `---- |
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,7 +1,11 @@ | ||
//// [ES5For-of20.ts] | ||
//! | ||
//! x 'const' declarations must be initialized | ||
//! ,---- | ||
//! 4 | const v; | ||
//! : ^ | ||
//! ,-[2:1] | ||
//! 2 | let v; | ||
//! 3 | for (let v of [v]) { | ||
//! 4 | const v; | ||
//! : ^ | ||
//! 5 | } | ||
//! 6 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration11_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration11_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function * yield() { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration11_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration11_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function * yield() { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration2_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration2_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration2_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration2_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
6 changes: 4 additions & 2 deletions
6
crates/swc/tests/tsc-references/FunctionDeclaration3_es6.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,14 +1,16 @@ | ||
//// [FunctionDeclaration3_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- | ||
//! | ||
//! x Unexpected token `yield`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, | ||
//! | ` for template literal, (, or an identifier | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
6 changes: 4 additions & 2 deletions
6
crates/swc/tests/tsc-references/FunctionDeclaration3_es6.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,14 +1,16 @@ | ||
//// [FunctionDeclaration3_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- | ||
//! | ||
//! x Unexpected token `yield`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, | ||
//! | ` for template literal, (, or an identifier | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function f(yield = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration4_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration4_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function yield() { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration4_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration4_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function yield() { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
6 changes: 4 additions & 2 deletions
6
crates/swc/tests/tsc-references/FunctionDeclaration5_es6.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,13 +1,15 @@ | ||
//// [FunctionDeclaration5_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- | ||
//! | ||
//! x Expected ident | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
6 changes: 4 additions & 2 deletions
6
crates/swc/tests/tsc-references/FunctionDeclaration5_es6.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,13 +1,15 @@ | ||
//// [FunctionDeclaration5_es6.ts] | ||
//! | ||
//! x `yield` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- | ||
//! | ||
//! x Expected ident | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration6_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration6_es6.ts] | ||
//! | ||
//! x 'yield' cannot be used as a parameter within generator | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/FunctionDeclaration6_es6.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,7 +1,8 @@ | ||
//// [FunctionDeclaration6_es6.ts] | ||
//! | ||
//! x 'yield' cannot be used as a parameter within generator | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! 2 | } | ||
//! `---- |
10 changes: 7 additions & 3 deletions
10
crates/swc/tests/tsc-references/FunctionDeclaration7_es6.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,7 +1,11 @@ | ||
//// [FunctionDeclaration7_es6.ts] | ||
//! | ||
//! x 'yield' cannot be used as a parameter within generator | ||
//! ,---- | ||
//! 3 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! ,-[1:1] | ||
//! 1 | function*bar() { | ||
//! 2 | // 'yield' here is an identifier, and not a yield expression. | ||
//! 3 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! 4 | } | ||
//! 5 | } | ||
//! `---- |
10 changes: 7 additions & 3 deletions
10
crates/swc/tests/tsc-references/FunctionDeclaration7_es6.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,7 +1,11 @@ | ||
//// [FunctionDeclaration7_es6.ts] | ||
//! | ||
//! x 'yield' cannot be used as a parameter within generator | ||
//! ,---- | ||
//! 3 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! ,-[1:1] | ||
//! 1 | function*bar() { | ||
//! 2 | // 'yield' here is an identifier, and not a yield expression. | ||
//! 3 | function*foo(a = yield) { | ||
//! : ^^^^^ | ||
//! 4 | } | ||
//! 5 | } | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/VariableDeclaration11_es6.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,7 +1,8 @@ | ||
//// [VariableDeclaration11_es6.ts] | ||
//! | ||
//! x `let` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | "use strict"; | ||
//! 2 | let | ||
//! : ^^^ | ||
//! `---- |
3 changes: 2 additions & 1 deletion
3
crates/swc/tests/tsc-references/VariableDeclaration11_es6.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,7 +1,8 @@ | ||
//// [VariableDeclaration11_es6.ts] | ||
//! | ||
//! x `let` cannot be used as an identifier in strict mode | ||
//! ,---- | ||
//! ,-[1:1] | ||
//! 1 | "use strict"; | ||
//! 2 | let | ||
//! : ^^^ | ||
//! `---- |
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
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
8 changes: 5 additions & 3 deletions
8
crates/swc/tests/tsc-references/abstractPropertyInitializer.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,7 +1,9 @@ | ||
//// [abstractPropertyInitializer.ts] | ||
//! | ||
//! x Abstract property cannot have an initializer. | ||
//! ,---- | ||
//! 2 | abstract prop = 1 | ||
//! : ^^^^^^^^^^^^^^^^^ | ||
//! ,-[1:1] | ||
//! 1 | abstract class C { | ||
//! 2 | abstract prop = 1 | ||
//! : ^^^^^^^^^^^^^^^^^ | ||
//! 3 | } | ||
//! `---- |
8 changes: 5 additions & 3 deletions
8
crates/swc/tests/tsc-references/abstractPropertyInitializer.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,7 +1,9 @@ | ||
//// [abstractPropertyInitializer.ts] | ||
//! | ||
//! x Abstract property cannot have an initializer. | ||
//! ,---- | ||
//! 2 | abstract prop = 1 | ||
//! : ^^^^^^^^^^^^^^^^^ | ||
//! ,-[1:1] | ||
//! 1 | abstract class C { | ||
//! 2 | abstract prop = 1 | ||
//! : ^^^^^^^^^^^^^^^^^ | ||
//! 3 | } | ||
//! `---- |
38 changes: 26 additions & 12 deletions
38
crates/swc/tests/tsc-references/accessorWithES3.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,25 +1,39 @@ | ||
//// [accessorWithES3.ts] | ||
//! | ||
//! x jsc.target should be es5 or upper to use getter / setter | ||
//! ,---- | ||
//! 5 | get x() { | ||
//! : ^ | ||
//! ,-[3:1] | ||
//! 3 | | ||
//! 4 | class C { | ||
//! 5 | get x() { | ||
//! : ^ | ||
//! 6 | return 1; | ||
//! 7 | } | ||
//! `---- | ||
//! | ||
//! x jsc.target should be es5 or upper to use getter / setter | ||
//! ,---- | ||
//! 11 | set x(v) { | ||
//! : ^ | ||
//! ,-[9:1] | ||
//! 9 | | ||
//! 10 | class D { | ||
//! 11 | set x(v) { | ||
//! : ^ | ||
//! 12 | } | ||
//! 13 | } | ||
//! `---- | ||
//! | ||
//! x jsc.target should be es5 or upper to use getter / setter | ||
//! ,---- | ||
//! 16 | get a() { return 1 } | ||
//! : ^ | ||
//! ,-[14:1] | ||
//! 14 | | ||
//! 15 | var x = { | ||
//! 16 | get a() { return 1 } | ||
//! : ^ | ||
//! 17 | } | ||
//! `---- | ||
//! | ||
//! x jsc.target should be es5 or upper to use getter / setter | ||
//! ,---- | ||
//! 20 | set b(v) { } | ||
//! : ^ | ||
//! ,-[18:1] | ||
//! 18 | | ||
//! 19 | var y = { | ||
//! 20 | set b(v) { } | ||
//! : ^ | ||
//! 21 | } | ||
//! `---- |
Oops, something went wrong.