mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Accepting new baselines
This commit is contained in:
@@ -6,15 +6,12 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(27,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(28,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(29,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -30,7 +27,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ====
|
||||
==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (27 errors) ====
|
||||
var x: number;
|
||||
x = 3; // OK
|
||||
(x) = 3; // OK
|
||||
@@ -74,24 +71,24 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
M2.M3 = { x: 3 }; // OK
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(M2).M3 = { x: 3 }; // OK
|
||||
~~~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(M2.M3) = { x: 3 }; // OK
|
||||
~~~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
M2.M3 = { x: '' }; // Error
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(M2).M3 = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(M2.M3) = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
|
||||
function fn() { }
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(12,7): error TS2304: Cannot find name 'A'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts (3 errors) ====
|
||||
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts (5 errors) ====
|
||||
// -- operator on enum type
|
||||
|
||||
enum ENUM1 { A, B, "" };
|
||||
|
||||
// expression
|
||||
var ResultIsNumber1 = --ENUM1["A"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
var ResultIsNumber2 = ENUM1.A--;
|
||||
~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
|
||||
// miss assignment operator
|
||||
--ENUM1["A"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
|
||||
ENUM1[A]--;
|
||||
~~~~~~~~
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(6,25): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (2 errors) ====
|
||||
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (4 errors) ====
|
||||
// ++ operator on enum type
|
||||
|
||||
enum ENUM1 { A, B, "" };
|
||||
|
||||
// expression
|
||||
var ResultIsNumber1 = ++ENUM1["B"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
var ResultIsNumber2 = ENUM1.B++;
|
||||
~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
|
||||
// miss assignment operator
|
||||
++ENUM1["B"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
|
||||
ENUM1.B++;
|
||||
~~~~~~~
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
tests/cases/compiler/interfaceImplementation5.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'.
|
||||
Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(18,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'.
|
||||
Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/interfaceImplementation5.ts (8 errors) ====
|
||||
==== tests/cases/compiler/interfaceImplementation5.ts (10 errors) ====
|
||||
interface I1 {
|
||||
getset1:number;
|
||||
}
|
||||
|
||||
class C1 implements I1 {
|
||||
~~
|
||||
!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'.
|
||||
!!! error TS2420: Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'.
|
||||
public get getset1(){return 1;}
|
||||
~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
@@ -35,6 +42,9 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors
|
||||
}
|
||||
|
||||
class C4 implements I1 {
|
||||
~~
|
||||
!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'.
|
||||
!!! error TS2420: Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'.
|
||||
public get getset1(){var x:any; return x;}
|
||||
~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
Reference in New Issue
Block a user