Skip to content

Commit

Permalink
accept new baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed Nov 3, 2016
1 parent 747f50f commit 023d5ca
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]() { }
Expand All @@ -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'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]() { }
Expand All @@ -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'.
Expand Down
23 changes: 23 additions & 0 deletions tests/baselines/reference/controlFlowDeleteOperator.errors.txt
Original file line number Diff line number Diff line change
@@ -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;
}
13 changes: 11 additions & 2 deletions tests/baselines/reference/deleteOperator1.errors.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
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;

// operand before delete operator
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.

Expand All @@ -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
}
}
52 changes: 38 additions & 14 deletions tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -43,15 +51,23 @@ 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
var ResultIsBoolean4 = delete M;
~
!!! 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;
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 023d5ca

Please sign in to comment.