Accepting new baselines
This commit is contained in:
parent
ea4e3afd98
commit
c78ee723a0
|
@ -1,7 +1,7 @@
|
|||
tests/cases/compiler/assignToEnum.ts(2,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/compiler/assignToEnum.ts(3,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/compiler/assignToEnum.ts(4,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/compiler/assignToEnum.ts(5,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/compiler/assignToEnum.ts(4,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
tests/cases/compiler/assignToEnum.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignToEnum.ts (4 errors) ====
|
||||
|
@ -14,9 +14,9 @@ tests/cases/compiler/assignToEnum.ts(5,1): error TS2364: Invalid left-hand side
|
|||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
A.foo = 1; // invalid LHS
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
A.foo = A.bar; // invalid LHS
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(11,1): error TS2304: Cannot find name 'M'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2304: Cannot find name 'I'.
|
||||
|
||||
|
@ -32,7 +32,7 @@ tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): er
|
|||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
E.A = null; // OK per spec, Error per implementation (509581)
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
function fn() { }
|
||||
fn = null; // Should be error
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(14,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.
|
||||
tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(15,12): error TS2476: A const enum member can only be accessed using a string literal.
|
||||
tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(17,1): error TS2322: Type 'string' is not assignable to type 'G'.
|
||||
tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
|
||||
==== tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts (4 errors) ====
|
||||
|
@ -31,5 +31,5 @@ tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts(19,1): error TS23
|
|||
function foo(x: G) { }
|
||||
G.B = 3;
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
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(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(7,23): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
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'.
|
||||
|
||||
|
@ -13,15 +13,15 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
|||
// expression
|
||||
var ResultIsNumber1 = --ENUM1["A"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
var ResultIsNumber2 = ENUM1.A--;
|
||||
~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
|
||||
// miss assignment operator
|
||||
--ENUM1["A"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
|
||||
ENUM1[A]--;
|
||||
~~~~~~~~
|
||||
|
|
|
@ -12,10 +12,10 @@ var x: number = E1.A;
|
|||
// Enum object type is anonymous with properties of the enum type and numeric indexer
|
||||
var e = E1;
|
||||
var e: {
|
||||
A: E1;
|
||||
B: E1;
|
||||
C: E1;
|
||||
[n: number]: string;
|
||||
readonly A: E1;
|
||||
readonly B: E1;
|
||||
readonly C: E1;
|
||||
readonly [n: number]: string;
|
||||
};
|
||||
var e: typeof E1;
|
||||
|
||||
|
|
|
@ -28,20 +28,20 @@ var e = E1;
|
|||
var e: {
|
||||
>e : Symbol(e, Decl(enumBasics.ts, 11, 3), Decl(enumBasics.ts, 12, 3), Decl(enumBasics.ts, 18, 3))
|
||||
|
||||
A: E1;
|
||||
readonly A: E1;
|
||||
>A : Symbol(A, Decl(enumBasics.ts, 12, 8))
|
||||
>E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0))
|
||||
|
||||
B: E1;
|
||||
>B : Symbol(B, Decl(enumBasics.ts, 13, 10))
|
||||
readonly B: E1;
|
||||
>B : Symbol(B, Decl(enumBasics.ts, 13, 19))
|
||||
>E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0))
|
||||
|
||||
C: E1;
|
||||
>C : Symbol(C, Decl(enumBasics.ts, 14, 10))
|
||||
readonly C: E1;
|
||||
>C : Symbol(C, Decl(enumBasics.ts, 14, 19))
|
||||
>E1 : Symbol(E1, Decl(enumBasics.ts, 0, 0))
|
||||
|
||||
[n: number]: string;
|
||||
>n : Symbol(n, Decl(enumBasics.ts, 16, 5))
|
||||
readonly [n: number]: string;
|
||||
>n : Symbol(n, Decl(enumBasics.ts, 16, 14))
|
||||
|
||||
};
|
||||
var e: typeof E1;
|
||||
|
|
|
@ -28,19 +28,19 @@ var e = E1;
|
|||
var e: {
|
||||
>e : typeof E1
|
||||
|
||||
A: E1;
|
||||
readonly A: E1;
|
||||
>A : E1
|
||||
>E1 : E1
|
||||
|
||||
B: E1;
|
||||
readonly B: E1;
|
||||
>B : E1
|
||||
>E1 : E1
|
||||
|
||||
C: E1;
|
||||
readonly C: E1;
|
||||
>C : E1
|
||||
>E1 : E1
|
||||
|
||||
[n: number]: string;
|
||||
readonly [n: number]: string;
|
||||
>n : number
|
||||
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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(6,25): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(7,23): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(10,3): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts(12,1): error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithEnumType.ts (4 errors) ====
|
||||
|
@ -12,16 +12,16 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp
|
|||
// expression
|
||||
var ResultIsNumber1 = ++ENUM1["B"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
var ResultIsNumber2 = ENUM1.B++;
|
||||
~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
|
||||
// miss assignment operator
|
||||
++ENUM1["B"];
|
||||
~~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
||||
|
||||
ENUM1.B++;
|
||||
~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant or a read-only property.
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(4,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(5,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(9,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(14,1): error TS2304: Cannot find name 'I'.
|
||||
tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
@ -15,7 +15,7 @@ tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.t
|
|||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
E.A = x;
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
class C { foo: string }
|
||||
var f: C;
|
||||
|
|
|
@ -79,13 +79,13 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetter
|
|||
var getter1 = { get x(): string { return undefined; } };
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
var getter1: { x: string; }
|
||||
var getter1: { readonly x: string; }
|
||||
|
||||
// Get accessor only, type of the property is the inferred return type of the get accessor
|
||||
var getter2 = { get x() { return ''; } };
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
var getter2: { x: string; }
|
||||
var getter2: { readonly x: string; }
|
||||
|
||||
// Set accessor only, type of the property is the param type of the set accessor
|
||||
var setter1 = { set x(n: number) { } };
|
||||
|
|
|
@ -17,11 +17,11 @@ var callSig3: { num: (n: number) => string; };
|
|||
|
||||
// Get accessor only, type of the property is the annotated return type of the get accessor
|
||||
var getter1 = { get x(): string { return undefined; } };
|
||||
var getter1: { x: string; }
|
||||
var getter1: { readonly x: string; }
|
||||
|
||||
// Get accessor only, type of the property is the inferred return type of the get accessor
|
||||
var getter2 = { get x() { return ''; } };
|
||||
var getter2: { x: string; }
|
||||
var getter2: { readonly x: string; }
|
||||
|
||||
// Set accessor only, type of the property is the param type of the set accessor
|
||||
var setter1 = { set x(n: number) { } };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,41): error TS2375: Duplicate number index signature.
|
||||
tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,70): error TS2375: Duplicate number index signature.
|
||||
|
||||
|
||||
==== tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts (1 errors) ====
|
||||
|
@ -9,8 +9,8 @@ tests/cases/compiler/typeOfEnumAndVarRedeclarations.ts(10,41): error TS2375: Dup
|
|||
b = 1
|
||||
}
|
||||
var x = E;
|
||||
var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error
|
||||
var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error
|
||||
var y = E;
|
||||
var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2375: Duplicate number index signature.
|
|
@ -6,9 +6,9 @@ enum E {
|
|||
b = 1
|
||||
}
|
||||
var x = E;
|
||||
var x: { a: E; b: E;[x: number]: string; }; // Shouldnt error
|
||||
var x: { readonly a: E; readonly b: E; readonly [x: number]: string; }; // Shouldnt error
|
||||
var y = E;
|
||||
var y: { a: E; b: E;[x: number]: string;[x: number]: string } // two errors: the types are not identical and duplicate signatures
|
||||
var y: { readonly a: E; readonly b: E; readonly [x: number]: string; readonly [x: number]: string } // two errors: the types are not identical and duplicate signatures
|
||||
|
||||
//// [typeOfEnumAndVarRedeclarations.js]
|
||||
var E;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(10,1): error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(15,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(20,1): error TS2304: Cannot find name 'I'.
|
||||
tests/cases/conformance/types/primitives/null/validNullAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
@ -17,7 +17,7 @@ tests/cases/conformance/types/primitives/null/validNullAssignments.ts(30,1): err
|
|||
enum E { A }
|
||||
E.A = null; // error
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
!!! error TS2450: Left-hand side of assignment expression cannot be a constant or a read-only property.
|
||||
|
||||
class C { foo: string }
|
||||
var f: C;
|
||||
|
|
Loading…
Reference in a new issue