Skip to content

Commit dbc661f

Browse files
committed
Accept new baselines
1 parent 1710df5 commit dbc661f

14 files changed

+42
-33
lines changed

Diff for: tests/baselines/reference/for-inStatements.errors.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(33,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
2+
tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(50,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
13
tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
24

35

4-
==== tests/cases/conformance/statements/for-inStatements/for-inStatements.ts (1 errors) ====
6+
==== tests/cases/conformance/statements/for-inStatements/for-inStatements.ts (3 errors) ====
57
var aString: string;
68
for (aString in {}) { }
79

@@ -35,6 +37,8 @@ tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15):
3537
for (var x in this.biz()) { }
3638
for (var x in this.biz) { }
3739
for (var x in this) { }
40+
~
41+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
3842
return null;
3943
}
4044

@@ -52,6 +56,8 @@ tests/cases/conformance/statements/for-inStatements/for-inStatements.ts(79,15):
5256
for (var x in this.biz()) { }
5357
for (var x in this.biz) { }
5458
for (var x in this) { }
59+
~
60+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
5561

5662
for (var x in super.biz) { }
5763
for (var x in super.biz()) { }

Diff for: tests/baselines/reference/for-inStatementsInvalid.errors.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(1
99
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(20,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1010
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(22,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1111
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
12+
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(31,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
1213
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(38,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1314
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(46,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
15+
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(48,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
1416
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(51,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1517
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(62,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1618

1719

18-
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (15 errors) ====
20+
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (17 errors) ====
1921
var aNumber: number;
2022
for (aNumber in {}) { }
2123
~~~~~~~
@@ -69,6 +71,8 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(6
6971
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
7072
for (var x in this.biz) { }
7173
for (var x in this) { }
74+
~
75+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
7276
return null;
7377
}
7478

@@ -90,6 +94,8 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(6
9094
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
9195
for (var x in this.biz) { }
9296
for (var x in this) { }
97+
~
98+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'string', but here has type 'keyof this'.
9399

94100
for (var x in super.biz) { }
95101
for (var x in super.biz()) { }

Diff for: tests/baselines/reference/forInStatement3.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function F<T>() {
88
>T : T
99

1010
for (var a in expr) {
11-
>a : string
11+
>a : keyof T
1212
>expr : T
1313
}
1414
}

Diff for: tests/baselines/reference/implicitAnyInCatch.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class C {
2222
>temp : () => void
2323

2424
for (var x in this) {
25-
>x : string
25+
>x : keyof this
2626
>this : this
2727
}
2828
}

Diff for: tests/baselines/reference/inOperatorWithGeneric.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class C<T> {
99
>T : T
1010

1111
for (var p in x) {
12-
>p : string
12+
>p : keyof T
1313
>x : T
1414
}
1515
}

Diff for: tests/baselines/reference/parserES5ForOfStatement19.errors.txt

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts ===
2+
for (var of in of) { }
3+
>of : Symbol(of, Decl(parserES5ForOfStatement19.ts, 0, 8))
4+
>of : Symbol(of, Decl(parserES5ForOfStatement19.ts, 0, 8))
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts ===
2+
for (var of in of) { }
3+
>of : any
4+
>of : any
5+
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
2-
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts(1,20): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
32

43

5-
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts (2 errors) ====
4+
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts (1 errors) ====
65
for (var of = 0 in of) { }
76
~~
8-
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
9-
~~
10-
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
7+
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.

Diff for: tests/baselines/reference/parserForOfStatement19.errors.txt

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts ===
2+
for (var of in of) { }
3+
>of : Symbol(of, Decl(parserForOfStatement19.ts, 0, 8))
4+
>of : Symbol(of, Decl(parserForOfStatement19.ts, 0, 8))
5+
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts ===
2+
for (var of in of) { }
3+
>of : any
4+
>of : any
5+
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
2-
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts(1,20): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
32

43

5-
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts (2 errors) ====
4+
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts (1 errors) ====
65
for (var of = 0 in of) { }
76
~~
8-
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
9-
~~
10-
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
7+
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.

Diff for: tests/baselines/reference/recursiveLetConst.errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ tests/cases/compiler/recursiveLetConst.ts(5,14): error TS2448: Block-scoped vari
55
tests/cases/compiler/recursiveLetConst.ts(6,14): error TS2448: Block-scoped variable 'v' used before its declaration.
66
tests/cases/compiler/recursiveLetConst.ts(7,1): error TS7027: Unreachable code detected.
77
tests/cases/compiler/recursiveLetConst.ts(7,16): error TS2448: Block-scoped variable 'v' used before its declaration.
8-
tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
98
tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2448: Block-scoped variable 'v' used before its declaration.
109
tests/cases/compiler/recursiveLetConst.ts(9,15): error TS2448: Block-scoped variable 'v' used before its declaration.
1110
tests/cases/compiler/recursiveLetConst.ts(10,17): error TS2448: Block-scoped variable 'v' used before its declaration.
1211
tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped variable 'x2' used before its declaration.
1312

1413

15-
==== tests/cases/compiler/recursiveLetConst.ts (12 errors) ====
14+
==== tests/cases/compiler/recursiveLetConst.ts (11 errors) ====
1615
'use strict'
1716
let x = x + 1;
1817
~
@@ -36,8 +35,6 @@ tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped var
3635
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
3736
for (let v in v) { }
3837
~
39-
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
40-
~
4138
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
4239
for (let v of v) { }
4340
~

0 commit comments

Comments
 (0)