Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/parser/class.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export class Invalid<T> {
get instanceGetter<T>(a: i32) {}
set instanceSetter<T>() {}
}
// ERROR 1092: "Type parameters cannot appear on a constructor declaration." in class.ts:15:13
// ERROR 1110: "Type expected." in class.ts:18:20
// ERROR 1094: "An accessor cannot have type parameters." in class.ts:23:20
// ERROR 1054: "A 'get' accessor cannot have parameters." in class.ts:23:6
// ERROR 1110: "Type expected." in class.ts:23:31
// ERROR 1094: "An accessor cannot have type parameters." in class.ts:28:20
// ERROR 1049: "A 'set' accessor must have exactly one parameter." in class.ts:28:6
// ERROR 1095: "A 'set' accessor cannot have a return type annotation." in class.ts:28:25
// ERROR 1092: "Type parameters cannot appear on a constructor declaration." in class.ts:15:14
// ERROR 1110: "Type expected." in class.ts:18:21
// ERROR 1094: "An accessor cannot have type parameters." in class.ts:23:21
// ERROR 1054: "A 'get' accessor cannot have parameters." in class.ts:23:7
// ERROR 1110: "Type expected." in class.ts:23:32
// ERROR 1094: "An accessor cannot have type parameters." in class.ts:28:21
// ERROR 1049: "A 'set' accessor must have exactly one parameter." in class.ts:28:7
// ERROR 1095: "A 'set' accessor cannot have a return type annotation." in class.ts:28:26
4 changes: 2 additions & 2 deletions tests/parser/continue-on-error.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ from;
do {
;
} while (false);
// ERROR 1003: "Identifier expected." in continue-on-error.ts:2:0
// ERROR 1005: "'(' expected." in continue-on-error.ts:4:0
// ERROR 1003: "Identifier expected." in continue-on-error.ts:2:1
// ERROR 1005: "'(' expected." in continue-on-error.ts:4:1
6 changes: 3 additions & 3 deletions tests/parser/definite-assignment-assertion.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ function f(): void {
let x!: i32;
let x!: i32 = 0;
}
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:3:10
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:4:14
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:8:6
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:2:11
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:3:15
// ERROR 1255: "A definite assignment assertion '!' is not permitted in this context." in definite-assignment-assertion.ts:8:7
2 changes: 1 addition & 1 deletion tests/parser/function-type.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ var a: () => void;
var b: (a: i32, b: i32) => void;
var c: (a: i32, b: i32) => (a: i32, b: i32) => void;
var d: (a) => void;
// ERROR 1110: "Type expected." in function-type.ts:4:9
// ERROR 1110: "Type expected." in function-type.ts:4:10
4 changes: 2 additions & 2 deletions tests/parser/namespace.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ declare namespace A {
}
}
}
// ERROR 1039: "Initializers are not allowed in ambient contexts." in namespace.ts:6:31
// ERROR 1183: "An implementation cannot be declared in ambient contexts." in namespace.ts:8:36
// ERROR 1039: "Initializers are not allowed in ambient contexts." in namespace.ts:6:32
// ERROR 1183: "An implementation cannot be declared in ambient contexts." in namespace.ts:8:37
16 changes: 8 additions & 8 deletions tests/parser/numeric-separators.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
41610;
2302755;
2302755;
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:8:8
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:9:3
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:11:10
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:12:5
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:14:10
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:15:5
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:17:10
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:18:5
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:8:9
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:9:4
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:11:11
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:12:6
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:14:11
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:15:6
// ERROR 6188: "Numeric separators are not allowed here." in numeric-separators.ts:17:11
// ERROR 6189: "Multiple consecutive numeric separators are not permitted." in numeric-separators.ts:18:6
2 changes: 1 addition & 1 deletion tests/parser/optional-property.ts.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class C {
x: i32;
}
// ERROR 219: "Optional properties are not supported." in optional-property.ts:2:9
// ERROR 219: "Optional properties are not supported." in optional-property.ts:1:10
2 changes: 1 addition & 1 deletion tests/parser/optional-typeparameters.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ function a<T, U=i32>(): T {
function a<T, U=i32, V>(): T {
return 0;
}
// ERROR 2706: "Required type parameters may not follow optional type parameters." in optional-typeparameters.ts:3:19
// ERROR 2706: "Required type parameters may not follow optional type parameters." in optional-typeparameters.ts:3:20
6 changes: 3 additions & 3 deletions tests/parser/parameter-order.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ function optionalValid(a: i32, b?: i32): void {}
function restParameterMustBeLast(...a: Array<i32>, b: i32): void {}
function optionalCannotPrecedeRequired(a?: i32, b: i32): void {}
function optionalWithInitializerCannotPrecedeRequired(a?: i32 = 1, b: i32): void {}
// ERROR 1014: "A rest parameter must be last in a parameter list." in parameter-order.ts:5:36
// ERROR 1016: "A required parameter cannot follow an optional parameter." in parameter-order.ts:8:48
// ERROR 1016: "A required parameter cannot follow an optional parameter." in parameter-order.ts:11:66
// ERROR 1014: "A rest parameter must be last in a parameter list." in parameter-order.ts:5:37
// ERROR 1016: "A required parameter cannot follow an optional parameter." in parameter-order.ts:8:49
// ERROR 1016: "A required parameter cannot follow an optional parameter." in parameter-order.ts:11:67
10 changes: 5 additions & 5 deletions tests/parser/regexp.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ b / ig;
/(abc)\//iig;
/(abc)\//iX;
false && /abc/gX.test(someString) || true;
// ERROR 1161: "Unterminated regular expression literal." in regexp.ts:5:1
// ERROR 1005: "'/' expected." in regexp.ts:5:0
// ERROR 209: "Invalid regular expression flags." in regexp.ts:8:9
// ERROR 209: "Invalid regular expression flags." in regexp.ts:9:9
// ERROR 209: "Invalid regular expression flags." in regexp.ts:10:14
// ERROR 1161: "Unterminated regular expression literal." in regexp.ts:5:2
// ERROR 1005: "'/' expected." in regexp.ts:5:1
// ERROR 209: "Invalid regular expression flags." in regexp.ts:8:10
// ERROR 209: "Invalid regular expression flags." in regexp.ts:9:10
// ERROR 209: "Invalid regular expression flags." in regexp.ts:10:15
4 changes: 2 additions & 2 deletions tests/parser/var.ts.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ var d = 2;
var e;
const f: i32;
const t = 0 < (c / 10);
// ERROR 1110: "Type expected." in var.ts:7:5
// ERROR 1155: "'const' declarations must be initialized." in var.ts:10:6
// ERROR 1110: "Type expected." in var.ts:7:6
// ERROR 1155: "'const' declarations must be initialized." in var.ts:10:7