Skip to content

Commit 221c0d7

Browse files
committed
Accept new baselines
1 parent 894ba85 commit 221c0d7

5 files changed

+43
-13
lines changed

tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(35,24): error TS2532: Object is possibly 'undefined'.
2+
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(36,24): error TS2531: Object is possibly 'null'.
13
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(47,26): error TS2531: Object is possibly 'null'.
24
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(47,33): error TS2532: Object is possibly 'undefined'.
35
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2531: Object is possibly 'null'.
@@ -6,7 +8,7 @@ tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNot
68
tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(49,38): error TS2532: Object is possibly 'undefined'.
79

810

9-
==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts (6 errors) ====
11+
==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts (8 errors) ====
1012

1113
// ~ operator on any type
1214

@@ -42,7 +44,11 @@ tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNot
4244

4345
// any type literal
4446
var ResultIsNumber6 = ~undefined;
47+
~~~~~~~~~
48+
!!! error TS2532: Object is possibly 'undefined'.
4549
var ResultIsNumber7 = ~null;
50+
~~~~
51+
!!! error TS2531: Object is possibly 'null'.
4652

4753
// any type expressions
4854
var ResultIsNumber8 = ~ANY2[0]

tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
99
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1010
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1111
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
12-
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
12+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
13+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2531: Object is possibly 'null'.
1314
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2539: Cannot assign to 'undefined' because it is not a variable.
14-
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
15+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
16+
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2531: Object is possibly 'null'.
1517
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1618
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2539: Cannot assign to 'undefined' because it is not a variable.
1719
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
@@ -56,7 +58,7 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
5658
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,12): error TS1109: Expression expected.
5759

5860

59-
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (56 errors) ====
61+
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (58 errors) ====
6062
// -- operator on any type
6163
var ANY1: any;
6264
var ANY2: any[] = ["", ""];
@@ -118,14 +120,18 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
118120
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
119121
var ResultIsNumber12 = --null;
120122
~~~~
121-
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
123+
!!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
124+
~~~~
125+
!!! error TS2531: Object is possibly 'null'.
122126
var ResultIsNumber13 = --undefined;
123127
~~~~~~~~~
124128
!!! error TS2539: Cannot assign to 'undefined' because it is not a variable.
125129

126130
var ResultIsNumber14 = null--;
127131
~~~~
128-
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
132+
!!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
133+
~~~~
134+
!!! error TS2531: Object is possibly 'null'.
129135
var ResultIsNumber15 = {}--;
130136
~~
131137
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.

tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
99
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(33,23): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1010
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(34,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1111
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(37,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
12-
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
12+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
13+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(38,26): error TS2531: Object is possibly 'null'.
1314
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(39,26): error TS2539: Cannot assign to 'undefined' because it is not a variable.
14-
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
15+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
16+
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(41,24): error TS2531: Object is possibly 'null'.
1517
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(42,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
1618
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(43,24): error TS2539: Cannot assign to 'undefined' because it is not a variable.
1719
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(46,26): error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
@@ -51,7 +53,7 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
5153
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,12): error TS1109: Expression expected.
5254

5355

54-
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (51 errors) ====
56+
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (53 errors) ====
5557
// ++ operator on any type
5658
var ANY1: any;
5759
var ANY2: any[] = [1, 2];
@@ -113,14 +115,18 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
113115
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
114116
var ResultIsNumber12 = ++null;
115117
~~~~
116-
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
118+
!!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
119+
~~~~
120+
!!! error TS2531: Object is possibly 'null'.
117121
var ResultIsNumber13 = ++undefined;
118122
~~~~~~~~~
119123
!!! error TS2539: Cannot assign to 'undefined' because it is not a variable.
120124

121125
var ResultIsNumber14 = null++;
122126
~~~~
123-
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
127+
!!! error TS2357: The operand of an increment or decrement operator must be a variable or a property access.
128+
~~~~
129+
!!! error TS2531: Object is possibly 'null'.
124130
var ResultIsNumber15 = {}++;
125131
~~
126132
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.

tests/baselines/reference/negateOperatorWithAnyOtherType.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(34,24): error TS2532: Object is possibly 'undefined'.
2+
tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(35,23): error TS2531: Object is possibly 'null'.
13
tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts(51,1): error TS2695: Left side of comma operator is unused and has no side effects.
24

35

4-
==== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts (1 errors) ====
6+
==== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts (3 errors) ====
57
// - operator on any type
68

79
var ANY: any;
@@ -36,7 +38,11 @@ tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperator
3638

3739
// any type literal
3840
var ResultIsNumber7 = -undefined;
41+
~~~~~~~~~
42+
!!! error TS2532: Object is possibly 'undefined'.
3943
var ResultIsNumber = -null;
44+
~~~~
45+
!!! error TS2531: Object is possibly 'null'.
4046

4147
// any type expressions
4248
var ResultIsNumber8 = -ANY2[0];

tests/baselines/reference/plusOperatorWithAnyOtherType.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(34,24): error TS2532: Object is possibly 'undefined'.
2+
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(35,24): error TS2531: Object is possibly 'null'.
13
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(46,26): error TS2531: Object is possibly 'null'.
24
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(46,33): error TS2532: Object is possibly 'undefined'.
35
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(47,26): error TS2531: Object is possibly 'null'.
@@ -7,7 +9,7 @@ tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWith
79
tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts(54,1): error TS2695: Left side of comma operator is unused and has no side effects.
810

911

10-
==== tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts (7 errors) ====
12+
==== tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts (9 errors) ====
1113
// + operator on any type
1214

1315
var ANY: any;
@@ -42,7 +44,11 @@ tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWith
4244

4345
// any type literal
4446
var ResultIsNumber7 = +undefined;
47+
~~~~~~~~~
48+
!!! error TS2532: Object is possibly 'undefined'.
4549
var ResultIsNumber8 = +null;
50+
~~~~
51+
!!! error TS2531: Object is possibly 'null'.
4652

4753
// any type expressions
4854
var ResultIsNumber9 = +ANY2[0];

0 commit comments

Comments
 (0)