Skip to content

Commit 52d2aa5

Browse files
committed
Accept new baselines
1 parent 0621f7e commit 52d2aa5

12 files changed

+50
-38
lines changed

tests/baselines/reference/assignEveryTypeToAny.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ var e = undefined;
5959
>undefined : undefined
6060

6161
x = e;
62-
>x = e : any
62+
>x = e : undefined
6363
>x : any
64-
>e : any
64+
>e : undefined
6565

6666
var e2: typeof undefined;
6767
>e2 : any

tests/baselines/reference/forIn.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
tests/cases/compiler/forIn.ts(2,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
2+
tests/cases/compiler/forIn.ts(2,22): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
3+
tests/cases/compiler/forIn.ts(7,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
4+
tests/cases/compiler/forIn.ts(18,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
25
tests/cases/compiler/forIn.ts(20,4): error TS2304: Cannot find name 'k'.
36

47

5-
==== tests/cases/compiler/forIn.ts (2 errors) ====
8+
==== tests/cases/compiler/forIn.ts (5 errors) ====
69
var arr = null;
710
for (var i:number in arr) { // error
811
~
912
!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
13+
~~~
14+
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1015
var x1 = arr[i];
1116
var y1 = arr[i];
1217
}
1318

1419
for (var j in arr) { // ok
20+
~~~
21+
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
1522
var x2 = arr[j];
1623
var y2 = arr[j];
1724
}
@@ -23,6 +30,8 @@ tests/cases/compiler/forIn.ts(20,4): error TS2304: Cannot find name 'k'.
2330
}
2431

2532
for (var l in arr) {
33+
~~~
34+
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
2635
// error in the body
2736
k[l] = 1;
2837
~

tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(3,5): error TS7034: Variable 'y' implicitly has type 'any' and is referenced in a nested function.
1+
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(3,5): error TS7034: Variable 'y' implicitly has type 'any' in some locations where its type cannot be determined.
22
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(4,13): error TS7005: Variable 'foo' implicitly has an 'any' type.
33
tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(5,15): error TS7006: Parameter 'k' implicitly has an 'any' type.
44

@@ -8,7 +8,7 @@ tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts(5,15): err
88
var x; // no error, control flow typed
99
var y; // error because captured
1010
~
11-
!!! error TS7034: Variable 'y' implicitly has type 'any' and is referenced in a nested function.
11+
!!! error TS7034: Variable 'y' implicitly has type 'any' in some locations where its type cannot be determined.
1212
declare var foo; // error at "foo"
1313
~~~
1414
!!! error TS7005: Variable 'foo' implicitly has an 'any' type.

tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(2,5): error TS7005: Variable 'arg0' implicitly has an 'any' type.
21
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(3,5): error TS7005: Variable 'anyArray' implicitly has an 'any[]' type.
32
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,13): error TS7008: Member 'v' implicitly has an 'any' type.
43
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(4,16): error TS7008: Member 'w' implicitly has an 'any' type.
@@ -7,11 +6,9 @@ tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(6,16): er
76
tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts(10,36): error TS7006: Parameter 'y2' implicitly has an 'any' type.
87

98

10-
==== tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts (7 errors) ====
9+
==== tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts (6 errors) ====
1110
// this should be errors
1211
var arg0 = null; // error at "arg0"
13-
~~~~
14-
!!! error TS7005: Variable 'arg0' implicitly has an 'any' type.
1512
var anyArray = [null, undefined]; // error at array literal
1613
~~~~~~~~
1714
!!! error TS7005: Variable 'anyArray' implicitly has an 'any[]' type.

tests/baselines/reference/implicitAnyWidenToAny.errors.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
tests/cases/compiler/implicitAnyWidenToAny.ts(2,5): error TS7005: Variable 'x' implicitly has an 'any' type.
2-
tests/cases/compiler/implicitAnyWidenToAny.ts(3,5): error TS7005: Variable 'x1' implicitly has an 'any' type.
31
tests/cases/compiler/implicitAnyWidenToAny.ts(4,5): error TS7005: Variable 'widenArray' implicitly has an 'any[]' type.
42
tests/cases/compiler/implicitAnyWidenToAny.ts(5,5): error TS7005: Variable 'emptyArray' implicitly has an 'any[]' type.
53

64

7-
==== tests/cases/compiler/implicitAnyWidenToAny.ts (4 errors) ====
5+
==== tests/cases/compiler/implicitAnyWidenToAny.ts (2 errors) ====
86
// these should be errors
97
var x = null; // error at "x"
10-
~
11-
!!! error TS7005: Variable 'x' implicitly has an 'any' type.
128
var x1 = undefined; // error at "x1"
13-
~~
14-
!!! error TS7005: Variable 'x1' implicitly has an 'any' type.
159
var widenArray = [null, undefined]; // error at "widenArray"
1610
~~~~~~~~~~
1711
!!! error TS7005: Variable 'widenArray' implicitly has an 'any[]' type.

tests/baselines/reference/json.stringify.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== tests/cases/compiler/json.stringify.ts ===
22

33
var value = null;
4-
>value : null
4+
>value : any
55
>null : null
66

77
JSON.stringify(value, undefined, 2);

tests/baselines/reference/noImplicitAnyDestructuringVarDeclaration.errors.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1
66
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type.
77
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer.
88
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type.
9-
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,36): error TS7005: Variable 'c1' implicitly has an 'any' type.
10-
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,52): error TS7005: Variable 'd1' implicitly has an 'any' type.
119
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer.
1210
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer.
1311
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer.
1412
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type.
1513
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type.
1614
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,6): error TS7031: Binding element 'a4' implicitly has an 'any' type.
1715
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,26): error TS7031: Binding element 'b4' implicitly has an 'any' type.
18-
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,46): error TS7005: Variable 'c4' implicitly has an 'any' type.
19-
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,62): error TS7005: Variable 'd4' implicitly has an 'any' type.
2016
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS7031: Binding element 'a5' implicitly has an 'any' type.
2117

2218

23-
==== tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts (20 errors) ====
19+
==== tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts (16 errors) ====
2420
var [a], {b}, c, d; // error
2521
~~~
2622
!!! error TS1182: A destructuring declaration must have an initializer.
@@ -40,10 +36,6 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS
4036
!!! error TS1182: A destructuring declaration must have an initializer.
4137
~~
4238
!!! error TS7031: Binding element 'b1' implicitly has an 'any' type.
43-
~~
44-
!!! error TS7005: Variable 'c1' implicitly has an 'any' type.
45-
~~
46-
!!! error TS7005: Variable 'd1' implicitly has an 'any' type.
4739

4840
var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any;
4941
~~~~
@@ -64,10 +56,6 @@ tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS
6456
!!! error TS7031: Binding element 'a4' implicitly has an 'any' type.
6557
~~
6658
!!! error TS7031: Binding element 'b4' implicitly has an 'any' type.
67-
~~
68-
!!! error TS7005: Variable 'c4' implicitly has an 'any' type.
69-
~~
70-
!!! error TS7005: Variable 'd4' implicitly has an 'any' type.
7159

7260
var [a5 = undefined] = []; // error
7361
~~

tests/baselines/reference/null.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ var x=null;
55
>null : null
66

77
var y=3+x;
8-
>y : any
9-
>3+x : any
8+
>y : number
9+
>3+x : number
1010
>3 : 3
11-
>x : any
11+
>x : null
1212

1313
var z=3+null;
1414
>z : number

tests/baselines/reference/parserharness.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,42): e
2525
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(781,23): error TS2503: Cannot find namespace 'TypeScript'.
2626
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(794,49): error TS2304: Cannot find name 'TypeScript'.
2727
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(795,49): error TS2304: Cannot find name 'TypeScript'.
28+
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(820,31): error TS2339: Property 'length' does not exist on type 'null'.
29+
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(976,28): error TS2339: Property 'length' does not exist on type 'null'.
30+
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(977,82): error TS2339: Property 'join' does not exist on type 'null'.
2831
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,53): error TS2304: Cannot find name 'TypeScript'.
2932
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,89): error TS2304: Cannot find name 'TypeScript'.
3033
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,115): error TS2503: Cannot find namespace 'TypeScript'.
@@ -110,7 +113,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(1787,68):
110113
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): error TS2304: Cannot find name 'Diff'.
111114

112115

113-
==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (110 errors) ====
116+
==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (113 errors) ====
114117
//
115118
// Copyright (c) Microsoft Corporation. All rights reserved.
116119
//
@@ -985,6 +988,8 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
985988
})
986989

987990
return errors.length === 0;
991+
~~~~~~
992+
!!! error TS2339: Property 'length' does not exist on type 'null'.
988993
}
989994

990995
public isSubtypeOf(other: Type) {
@@ -1141,7 +1146,11 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
11411146
})
11421147

11431148
if (errors.length > 0)
1149+
~~~~~~
1150+
!!! error TS2339: Property 'length' does not exist on type 'null'.
11441151
throw new Error("Type definition contains errors: " + errors.join(","));
1152+
~~~~
1153+
!!! error TS2339: Property 'join' does not exist on type 'null'.
11451154

11461155
var matchingIdentifiers: Type[] = [];
11471156

tests/baselines/reference/protoAsIndexInIndexExpression.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ var WorkspacePrototype = {
1414
}
1515
};
1616
WorkspacePrototype['__proto__'] = EntityPrototype;
17-
>WorkspacePrototype['__proto__'] = EntityPrototype : any
17+
>WorkspacePrototype['__proto__'] = EntityPrototype : undefined
1818
>WorkspacePrototype['__proto__'] : any
1919
>WorkspacePrototype : { serialize: () => any; }
2020
>'__proto__' : "___proto__"
21-
>EntityPrototype : any
21+
>EntityPrototype : undefined
2222

2323
var o = {
2424
>o : { "__proto__": number; }

0 commit comments

Comments
 (0)