Skip to content

Commit 023d5ca

Browse files
accept new baseline
1 parent 747f50f commit 023d5ca

15 files changed

+167
-41
lines changed

tests/baselines/reference/computedPropertyNames3_ES5.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(4,1
22
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2378: A 'get' accessor must return a value.
33
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
44
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
5+
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2698: The operand of a delete operator must be a property reference
56
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
67
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2378: A 'get' accessor must return a value.
78
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
89

910

10-
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts (7 errors) ====
11+
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts (8 errors) ====
1112
var id;
1213
class C {
1314
[0 + 1]() { }
@@ -21,6 +22,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,1
2122
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
2223
~~
2324
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
25+
~~
26+
!!! error TS2698: The operand of a delete operator must be a property reference
2427
set [[0, 1]](v) { }
2528
~~~~~~~~
2629
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.

tests/baselines/reference/computedPropertyNames3_ES6.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,1
22
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value.
33
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
44
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
5+
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2698: The operand of a delete operator must be a property reference
56
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
67
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value.
78
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
89

910

10-
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (7 errors) ====
11+
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (8 errors) ====
1112
var id;
1213
class C {
1314
[0 + 1]() { }
@@ -21,6 +22,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1
2122
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
2223
~~
2324
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
25+
~~
26+
!!! error TS2698: The operand of a delete operator must be a property reference
2427
set [[0, 1]](v) { }
2528
~~~~~~~~
2629
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2698: The operand of a delete operator must be a property reference
2+
3+
4+
==== tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts (1 errors) ====
5+
6+
function f() {
7+
let x: { a?: number | string, b: number | string } = { b: 1 };
8+
x.a;
9+
x.b;
10+
x.a = 1;
11+
x.b = 1;
12+
x.a;
13+
x.b;
14+
delete x.a;
15+
delete x.b;
16+
x.a;
17+
x.b;
18+
x;
19+
delete x; // No effect
20+
~
21+
!!! error TS2698: The operand of a delete operator must be a property reference
22+
x;
23+
}
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
tests/cases/compiler/deleteOperator1.ts(2,25): error TS2698: The operand of a delete operator must be a property reference
2+
tests/cases/compiler/deleteOperator1.ts(3,21): error TS2698: The operand of a delete operator must be a property reference
13
tests/cases/compiler/deleteOperator1.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'number'.
4+
tests/cases/compiler/deleteOperator1.ts(4,24): error TS2698: The operand of a delete operator must be a property reference
25

36

4-
==== tests/cases/compiler/deleteOperator1.ts (1 errors) ====
7+
==== tests/cases/compiler/deleteOperator1.ts (4 errors) ====
58
var a;
69
var x: boolean = delete a;
10+
~
11+
!!! error TS2698: The operand of a delete operator must be a property reference
712
var y: any = delete a;
13+
~
14+
!!! error TS2698: The operand of a delete operator must be a property reference
815
var z: number = delete a;
916
~
10-
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
17+
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
18+
~
19+
!!! error TS2698: The operand of a delete operator must be a property reference
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS1102: 'delete' cannot be called on an identifier in strict mode.
2+
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2698: The operand of a delete operator must be a property reference
23

34

4-
==== tests/cases/compiler/deleteOperatorInStrictMode.ts (1 errors) ====
5+
==== tests/cases/compiler/deleteOperatorInStrictMode.ts (2 errors) ====
56
"use strict"
67
var a;
78
delete a;
89
~
9-
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
10+
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
11+
~
12+
!!! error TS2698: The operand of a delete operator must be a property reference

tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected.
2+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2698: The operand of a delete operator must be a property reference
23
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected.
4+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2698: The operand of a delete operator must be a property reference
35
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected.
46
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode.
7+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2698: The operand of a delete operator must be a property reference
58

69

7-
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (4 errors) ====
10+
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (7 errors) ====
811
// Unary operator delete
912
var ANY;
1013

1114
// operand before delete operator
1215
var BOOLEAN1 = ANY delete ; //expect error
1316
~~~~~~
1417
!!! error TS1005: ',' expected.
18+
19+
!!! error TS2698: The operand of a delete operator must be a property reference
1520
~
1621
!!! error TS1109: Expression expected.
1722

1823
// miss an operand
1924
var BOOLEAN2 = delete ;
25+
26+
!!! error TS2698: The operand of a delete operator must be a property reference
2027
~
2128
!!! error TS1109: Expression expected.
2229

@@ -26,5 +33,7 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
2633
delete s; //expect error
2734
~
2835
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
36+
~
37+
!!! error TS2698: The operand of a delete operator must be a property reference
2938
}
3039
}

tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2698: The operand of a delete operator must be a property reference
2+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2698: The operand of a delete operator must be a property reference
13
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2698: The operand of a delete operator must be a property reference
24
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2698: The operand of a delete operator must be a property reference
5+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2698: The operand of a delete operator must be a property reference
6+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2698: The operand of a delete operator must be a property reference
37
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2698: The operand of a delete operator must be a property reference
48
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2698: The operand of a delete operator must be a property reference
59
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2698: The operand of a delete operator must be a property reference
610
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2698: The operand of a delete operator must be a property reference
7-
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,32): error TS2698: The operand of a delete operator must be a property reference
8-
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,32): error TS2698: The operand of a delete operator must be a property reference
11+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2698: The operand of a delete operator must be a property reference
912
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
10-
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,32): error TS2698: The operand of a delete operator must be a property reference
13+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2698: The operand of a delete operator must be a property reference
1114
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
12-
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,32): error TS2698: The operand of a delete operator must be a property reference
15+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2698: The operand of a delete operator must be a property reference
1316
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
17+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2698: The operand of a delete operator must be a property reference
1418
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2698: The operand of a delete operator must be a property reference
19+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2698: The operand of a delete operator must be a property reference
1520
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2698: The operand of a delete operator must be a property reference
1621
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2698: The operand of a delete operator must be a property reference
17-
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,46): error TS2698: The operand of a delete operator must be a property reference
22+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2698: The operand of a delete operator must be a property reference
23+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2698: The operand of a delete operator must be a property reference
24+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2698: The operand of a delete operator must be a property reference
25+
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2698: The operand of a delete operator must be a property reference
1826

1927

20-
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (17 errors) ====
28+
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (25 errors) ====
2129
// delete operator on any type
2230

2331
var ANY: any;
@@ -43,15 +51,23 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
4351

4452
// any type var
4553
var ResultIsBoolean1 = delete ANY1;
54+
~~~~
55+
!!! error TS2698: The operand of a delete operator must be a property reference
4656
var ResultIsBoolean2 = delete ANY2;
57+
~~~~
58+
!!! error TS2698: The operand of a delete operator must be a property reference
4759
var ResultIsBoolean3 = delete A;
4860
~
4961
!!! error TS2698: The operand of a delete operator must be a property reference
5062
var ResultIsBoolean4 = delete M;
5163
~
5264
!!! error TS2698: The operand of a delete operator must be a property reference
5365
var ResultIsBoolean5 = delete obj;
66+
~~~
67+
!!! error TS2698: The operand of a delete operator must be a property reference
5468
var ResultIsBoolean6 = delete obj1;
69+
~~~~
70+
!!! error TS2698: The operand of a delete operator must be a property reference
5571

5672
// any type literal
5773
var ResultIsBoolean7 = delete undefined;
@@ -74,41 +90,49 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
7490
~~~~~~~
7591
!!! error TS2698: The operand of a delete operator must be a property reference
7692
var ResultIsBoolean16 = delete (ANY + ANY1);
77-
~~~~~~~~~~~~
93+
~~~~~~~~~~
7894
!!! error TS2698: The operand of a delete operator must be a property reference
7995
var ResultIsBoolean17 = delete (null + undefined);
80-
~~~~~~~~~~~~~~~~~~
81-
!!! error TS2698: The operand of a delete operator must be a property reference
8296
~~~~~~~~~~~~~~~~
8397
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
84-
var ResultIsBoolean18 = delete (null + null);
85-
~~~~~~~~~~~~~
98+
~~~~~~~~~~~~~~~~
8699
!!! error TS2698: The operand of a delete operator must be a property reference
100+
var ResultIsBoolean18 = delete (null + null);
87101
~~~~~~~~~~~
88102
!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
89-
var ResultIsBoolean19 = delete (undefined + undefined);
90-
~~~~~~~~~~~~~~~~~~~~~~~
103+
~~~~~~~~~~~
91104
!!! error TS2698: The operand of a delete operator must be a property reference
105+
var ResultIsBoolean19 = delete (undefined + undefined);
92106
~~~~~~~~~~~~~~~~~~~~~
93107
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
108+
~~~~~~~~~~~~~~~~~~~~~
109+
!!! error TS2698: The operand of a delete operator must be a property reference
94110

95111
// multiple delete operators
96112
var ResultIsBoolean20 = delete delete ANY;
97113
~~~~~~~~~~
114+
!!! error TS2698: The operand of a delete operator must be a property reference
115+
~~~
98116
!!! error TS2698: The operand of a delete operator must be a property reference
99117
var ResultIsBoolean21 = delete delete delete (ANY + ANY1);
100118
~~~~~~~~~~~~~~~~~~~~~~~~~~
101119
!!! error TS2698: The operand of a delete operator must be a property reference
102120
~~~~~~~~~~~~~~~~~~~
103121
!!! error TS2698: The operand of a delete operator must be a property reference
104-
~~~~~~~~~~~~
122+
~~~~~~~~~~
105123
!!! error TS2698: The operand of a delete operator must be a property reference
106124

107125
// miss assignment operators
108126
delete ANY;
127+
~~~
128+
!!! error TS2698: The operand of a delete operator must be a property reference
109129
delete ANY1;
130+
~~~~
131+
!!! error TS2698: The operand of a delete operator must be a property reference
110132
delete ANY2[0];
111133
delete ANY, ANY1;
134+
~~~
135+
!!! error TS2698: The operand of a delete operator must be a property reference
112136
delete obj1.x;
113137
delete obj1.y;
114138
delete objA.a;

0 commit comments

Comments
 (0)