Accept new baselines

This commit is contained in:
Anders Hejlsberg
2017-01-06 17:20:28 -08:00
parent ee03c0dc87
commit 33e568465a
7 changed files with 36 additions and 29 deletions
@@ -1,14 +1,10 @@
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(3,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(7,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(15,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(19,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(23,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(27,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(28,5): error TS2502: 'y' is referenced directly or indirectly in its own type annotation.
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error TS2502: 'z' is referenced directly or indirectly in its own type annotation.
==== tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts (8 errors) ====
==== tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts (4 errors) ====
type T1 = {
x: T1["x"]; // Error
@@ -27,9 +23,7 @@ tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error
let x2x = x2.x;
interface T3<T extends T3<T>> {
x: T["x"]; // Error
~~~~~~~~~~
!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
x: T["x"];
}
interface T4<T extends T4<T>> {
@@ -45,13 +39,7 @@ tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error
}
class C2 {
x: this["y"]; // Error
~~~~~~~~~~~~~
!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
y: this["z"]; // Error
~~~~~~~~~~~~~
!!! error TS2502: 'y' is referenced directly or indirectly in its own type annotation.
z: this["x"]; // Error
~~~~~~~~~~~~~
!!! error TS2502: 'z' is referenced directly or indirectly in its own type annotation.
x: this["y"];
y: this["z"];
z: this["x"];
}
@@ -13,7 +13,7 @@ declare let x2: T2<"x">;
let x2x = x2.x;
interface T3<T extends T3<T>> {
x: T["x"]; // Error
x: T["x"];
}
interface T4<T extends T4<T>> {
@@ -25,9 +25,9 @@ class C1 {
}
class C2 {
x: this["y"]; // Error
y: this["z"]; // Error
z: this["x"]; // Error
x: this["y"];
y: this["z"];
z: this["x"];
}
//// [circularIndexedAccessErrors.js]
@@ -45,7 +45,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,5): error TS2322: T
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(131,5): error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number | undefined'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,16): error TS2322: Type '{}' is not assignable to type 'string'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,16): error TS2322: Type 'T' is not assignable to type 'string'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,21): error TS2536: Type 'P' cannot be used to index type 'T'.
@@ -259,7 +259,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,21): error TS2536:
pf: {[P in F]?: T[P]},
pt: {[P in T]?: T[P]}, // note: should be in keyof T
~
!!! error TS2322: Type '{}' is not assignable to type 'string'.
!!! error TS2322: Type 'T' is not assignable to type 'string'.
~~~~
!!! error TS2536: Type 'P' cannot be used to index type 'T'.
};
@@ -3,8 +3,12 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
Type 'T' is not assignable to type 'U'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
Type 'T' is not assignable to type 'U'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
Type 'T' is not assignable to type 'U'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'.
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
Type 'undefined' is not assignable to type 'T[keyof T]'.
@@ -28,7 +32,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(71,5): error TS2
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2322: Type 'Partial<T>' is not assignable to type 'T'.
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (18 errors) ====
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (20 errors) ====
function f1<T>(x: T, k: keyof T) {
return x[k];
@@ -59,6 +63,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2
~~~~
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
y[k] = x[k]; // Error
~~~~
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
!!! error TS2322: Type 'T' is not assignable to type 'U'.
~~~~
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
}
@@ -68,6 +75,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2
~~~~
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
y[k] = x[k]; // Error
~~~~
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
!!! error TS2322: Type 'T' is not assignable to type 'U'.
~~~~
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
}
@@ -23,11 +23,12 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,21): error TS2313: Type parameter 'T' has a circular constraint.
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,34): error TS2313: Type parameter 'U' has a circular constraint.
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,47): error TS2313: Type parameter 'V' has a circular constraint.
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,19): error TS2313: Type parameter 'U' has a circular constraint.
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,32): error TS2313: Type parameter 'T' has a circular constraint.
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,45): error TS2313: Type parameter 'V' has a circular constraint.
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (27 errors) ====
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (28 errors) ====
class C<U extends T, T extends U> { }
~
!!! error TS2313: Type parameter 'U' has a circular constraint.
@@ -96,6 +97,8 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd
!!! error TS2313: Type parameter 'V' has a circular constraint.
class D<U extends T, T extends V, V extends T> { }
~
!!! error TS2313: Type parameter 'U' has a circular constraint.
~
!!! error TS2313: Type parameter 'T' has a circular constraint.
~
@@ -1,16 +1,24 @@
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(1,19): error TS2313: Type parameter 'T' has a circular constraint.
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(4,19): error TS2339: Property 'foo' does not exist on type 'T'.
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(5,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(7,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
==== tests/cases/compiler/typeParameterWithInvalidConstraintType.ts (1 errors) ====
==== tests/cases/compiler/typeParameterWithInvalidConstraintType.ts (4 errors) ====
class A<T extends T> {
~
!!! error TS2313: Type parameter 'T' has a circular constraint.
foo() {
var x: T;
// no error expected below this line
var a = x.foo();
~~~
!!! error TS2339: Property 'foo' does not exist on type 'T'.
var b = new x(123);
~~~~~~~~~~
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
var c = x[1];
var d = x();
~~~
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
}
}
@@ -2,7 +2,6 @@
class A<T extends T> {
foo() {
var x: T;
// no error expected below this line
var a = x.foo();
var b = new x(123);
var c = x[1];
@@ -16,7 +15,6 @@ var A = (function () {
}
A.prototype.foo = function () {
var x;
// no error expected below this line
var a = x.foo();
var b = new x(123);
var c = x[1];