accept new baseline

This commit is contained in:
Herrington Darkholme 2016-11-03 13:25:58 +08:00
parent 747f50f447
commit 023d5caf3b
15 changed files with 167 additions and 41 deletions

View file

@ -2,12 +2,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(4,1
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2378: A 'get' accessor must return a value.
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'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2698: The operand of a delete operator must be a property reference
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'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2378: A 'get' accessor must return a value.
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'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts (7 errors) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts (8 errors) ====
var id;
class C {
[0 + 1]() { }
@ -21,6 +22,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,1
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
~~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~~
!!! error TS2698: The operand of a delete operator must be a property reference
set [[0, 1]](v) { }
~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.

View file

@ -2,12 +2,13 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,1
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value.
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'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2698: The operand of a delete operator must be a property reference
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'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value.
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'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (7 errors) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts (8 errors) ====
var id;
class C {
[0 + 1]() { }
@ -21,6 +22,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
~~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~~
!!! error TS2698: The operand of a delete operator must be a property reference
set [[0, 1]](v) { }
~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.

View file

@ -0,0 +1,23 @@
tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts (1 errors) ====
function f() {
let x: { a?: number | string, b: number | string } = { b: 1 };
x.a;
x.b;
x.a = 1;
x.b = 1;
x.a;
x.b;
delete x.a;
delete x.b;
x.a;
x.b;
x;
delete x; // No effect
~
!!! error TS2698: The operand of a delete operator must be a property reference
x;
}

View file

@ -1,10 +1,19 @@
tests/cases/compiler/deleteOperator1.ts(2,25): error TS2698: The operand of a delete operator must be a property reference
tests/cases/compiler/deleteOperator1.ts(3,21): error TS2698: The operand of a delete operator must be a property reference
tests/cases/compiler/deleteOperator1.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'number'.
tests/cases/compiler/deleteOperator1.ts(4,24): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/compiler/deleteOperator1.ts (1 errors) ====
==== tests/cases/compiler/deleteOperator1.ts (4 errors) ====
var a;
var x: boolean = delete a;
~
!!! error TS2698: The operand of a delete operator must be a property reference
var y: any = delete a;
~
!!! error TS2698: The operand of a delete operator must be a property reference
var z: number = delete a;
~
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -1,9 +1,12 @@
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/compiler/deleteOperatorInStrictMode.ts (1 errors) ====
==== tests/cases/compiler/deleteOperatorInStrictMode.ts (2 errors) ====
"use strict"
var a;
delete a;
~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -1,10 +1,13 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (4 errors) ====
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (7 errors) ====
// Unary operator delete
var ANY;
@ -12,11 +15,15 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
var BOOLEAN1 = ANY delete ; //expect error
~~~~~~
!!! error TS1005: ',' expected.
!!! error TS2698: The operand of a delete operator must be a property reference
~
!!! error TS1109: Expression expected.
// miss an operand
var BOOLEAN2 = delete ;
!!! error TS2698: The operand of a delete operator must be a property reference
~
!!! error TS1109: Expression expected.
@ -26,5 +33,7 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
delete s; //expect error
~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~
!!! error TS2698: The operand of a delete operator must be a property reference
}
}

View file

@ -1,23 +1,31 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,46): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (17 errors) ====
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (25 errors) ====
// delete operator on any type
var ANY: any;
@ -43,7 +51,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
// any type var
var ResultIsBoolean1 = delete ANY1;
~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean2 = delete ANY2;
~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean3 = delete A;
~
!!! error TS2698: The operand of a delete operator must be a property reference
@ -51,7 +63,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean5 = delete obj;
~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean6 = delete obj1;
~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// any type literal
var ResultIsBoolean7 = delete undefined;
@ -74,41 +90,49 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean16 = delete (ANY + ANY1);
~~~~~~~~~~~~
~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean17 = delete (null + undefined);
~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
var ResultIsBoolean18 = delete (null + null);
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean18 = delete (null + null);
~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
var ResultIsBoolean19 = delete (undefined + undefined);
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean19 = delete (undefined + undefined);
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// multiple delete operators
var ResultIsBoolean20 = delete delete ANY;
~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean21 = delete delete delete (ANY + ANY1);
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~
~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// miss assignment operators
delete ANY;
~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete ANY1;
~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete ANY2[0];
delete ANY, ANY1;
~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete obj1.x;
delete obj1.y;
delete objA.a;

View file

@ -1,14 +1,17 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(17,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(20,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(21,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(26,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(27,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,38): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(33,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(34,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(35,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(36,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts (8 errors) ====
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts (11 errors) ====
// delete operator on boolean type
var BOOLEAN: boolean;
@ -26,6 +29,8 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
// boolean type var
var ResultIsBoolean1 = delete BOOLEAN;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// boolean type literal
var ResultIsBoolean2 = delete true;
@ -49,12 +54,16 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
var ResultIsBoolean8 = delete delete BOOLEAN;
~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// miss assignment operators
delete true;
~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete BOOLEAN;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete foo();
~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -1,12 +1,12 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(7,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(8,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(11,31): error TS2699: The operand of a delete operator cannot be a read-only property
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,38): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,38): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,45): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,46): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(19,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(20,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(21,8): error TS2699: The operand of a delete operator cannot be a read-only property
@ -32,7 +32,7 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~~~~~~~~~~
!!! error TS2699: The operand of a delete operator cannot be a read-only property
var ResultIsBoolean4 = delete (ENUM[0] + ENUM1["B"]);
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// multiple delete operators
@ -46,7 +46,7 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// miss assignment operators

View file

@ -1,18 +1,23 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(18,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(19,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(22,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(23,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(24,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(30,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(31,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,46): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,47): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(39,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(40,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(41,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(42,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts (12 errors) ====
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts (17 errors) ====
// delete operator on number type
var NUMBER: number;
var NUMBER1: number[] = [1, 2];
@ -31,7 +36,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
// number type var
var ResultIsBoolean1 = delete NUMBER;
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean2 = delete NUMBER1;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// number type literal
var ResultIsBoolean3 = delete 1;
@ -55,19 +64,21 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean11 = delete (NUMBER + NUMBER);
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// multiple delete operator
var ResultIsBoolean12 = delete delete NUMBER;
~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean13 = delete delete delete (NUMBER + NUMBER);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// miss assignment operators
@ -75,7 +86,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~
!!! error TS2698: The operand of a delete operator must be a property reference
delete NUMBER;
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete NUMBER1;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete foo();
~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -1,19 +1,24 @@
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(18,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(19,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(22,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(23,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(24,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(30,31): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(31,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,33): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(33,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,32): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,39): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,46): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,47): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(40,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(41,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(42,8): error TS2698: The operand of a delete operator must be a property reference
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(43,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts (13 errors) ====
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts (18 errors) ====
// delete operator on string type
var STRING: string;
var STRING1: string[] = ["", "abc"];
@ -32,7 +37,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
// string type var
var ResultIsBoolean1 = delete STRING;
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean2 = delete STRING1;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// string type literal
var ResultIsBoolean3 = delete "";
@ -56,7 +65,7 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean11 = delete (STRING + STRING);
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean12 = delete STRING.charAt(0);
~~~~~~~~~~~~~~~~
@ -65,13 +74,15 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
// multiple delete operator
var ResultIsBoolean13 = delete delete STRING;
~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
var ResultIsBoolean14 = delete delete delete (STRING + STRING);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
// miss assignment operators
@ -79,7 +90,11 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator
~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete STRING;
~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete STRING1;
~~~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference
delete foo();
~~~~~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -1,8 +1,9 @@
tests/cases/compiler/deleteReadonly.ts(8,8): error TS2699: The operand of a delete operator cannot be a read-only property
tests/cases/compiler/deleteReadonly.ts(18,8): error TS2699: The operand of a delete operator cannot be a read-only property
tests/cases/compiler/deleteReadonly.ts(18,8): error TS2542: Index signature in type 'B' only permits reading.
tests/cases/compiler/deleteReadonly.ts(20,12): error TS2542: Index signature in type 'B' only permits reading.
==== tests/cases/compiler/deleteReadonly.ts (2 errors) ====
==== tests/cases/compiler/deleteReadonly.ts (3 errors) ====
interface A {
readonly b
}
@ -24,5 +25,9 @@ tests/cases/compiler/deleteReadonly.ts(18,8): error TS2699: The operand of a del
delete b['test'];
~~~~~~~~~
!!! error TS2699: The operand of a delete operator cannot be a read-only property
!!! error TS2542: Index signature in type 'B' only permits reading.
delete ((((b['test']))));
~~~~~~~~~
!!! error TS2542: Index signature in type 'B' only permits reading.

View file

@ -17,6 +17,8 @@ var b: B = {
};
delete b['test'];
delete ((((b['test']))));
//// [deleteReadonly.js]
@ -28,3 +30,4 @@ var b = {
'test': 'test'
};
delete b['test'];
delete ((((b['test']))));

View file

@ -1,11 +1,14 @@
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS2304: Cannot find name 'a'.
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS2698: The operand of a delete operator must be a property reference
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts (3 errors) ====
"use strict";
delete a;
~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~
!!! error TS2304: Cannot find name 'a'.
!!! error TS2304: Cannot find name 'a'.
~
!!! error TS2698: The operand of a delete operator must be a property reference

View file

@ -16,3 +16,5 @@ var b: B = {
};
delete b['test'];
delete ((((b['test']))));