From fe9ca725b92a2ca94e430abfe1c08efcb23c2627 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 24 Jul 2018 15:33:10 -0700 Subject: [PATCH] Accept new baselines --- ...arameterIndirectlyConstrainedToItself.errors.txt | 13 +++++++++++-- .../typeParameterIndirectlyConstrainedToItself.js | 9 ++++++++- ...peParameterIndirectlyConstrainedToItself.symbols | 13 +++++++++++++ ...typeParameterIndirectlyConstrainedToItself.types | 13 +++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.errors.txt b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.errors.txt index 4cfa9da2133..8ca5c51ea2d 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.errors.txt +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.errors.txt @@ -25,9 +25,10 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd 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,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(23,24): error TS2313: Type parameter 'S' 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 { } ~ !!! error TS2313: Type parameter 'U' has a circular constraint. @@ -99,4 +100,12 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd ~ !!! error TS2313: Type parameter 'T' has a circular constraint. ~ -!!! error TS2313: Type parameter 'V' has a circular constraint. \ No newline at end of file +!!! error TS2313: Type parameter 'V' has a circular constraint. + + // Repro from #25740 + + type Foo = [T] extends [number] ? {} : {}; + function foo>() {} + ~~~~~~ +!!! error TS2313: Type parameter 'S' has a circular constraint. + \ No newline at end of file diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js index 58d559d7fee..b6332f8011b 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js @@ -16,7 +16,13 @@ var a: { var b = () => { } var b2 = () => { } -class D { } +class D { } + +// Repro from #25740 + +type Foo = [T] extends [number] ? {} : {}; +function foo>() {} + //// [typeParameterIndirectlyConstrainedToItself.js] var C = /** @class */ (function () { @@ -39,3 +45,4 @@ var D = /** @class */ (function () { } return D; }()); +function foo() { } diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.symbols b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.symbols index f120f7251c6..3a8305e4012 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.symbols +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.symbols @@ -90,3 +90,16 @@ class D { } >V : Symbol(V, Decl(typeParameterIndirectlyConstrainedToItself.ts, 17, 33)) >T : Symbol(T, Decl(typeParameterIndirectlyConstrainedToItself.ts, 17, 20)) +// Repro from #25740 + +type Foo = [T] extends [number] ? {} : {}; +>Foo : Symbol(Foo, Decl(typeParameterIndirectlyConstrainedToItself.ts, 17, 50)) +>T : Symbol(T, Decl(typeParameterIndirectlyConstrainedToItself.ts, 21, 9)) +>T : Symbol(T, Decl(typeParameterIndirectlyConstrainedToItself.ts, 21, 9)) + +function foo>() {} +>foo : Symbol(foo, Decl(typeParameterIndirectlyConstrainedToItself.ts, 21, 45)) +>S : Symbol(S, Decl(typeParameterIndirectlyConstrainedToItself.ts, 22, 13)) +>Foo : Symbol(Foo, Decl(typeParameterIndirectlyConstrainedToItself.ts, 17, 50)) +>S : Symbol(S, Decl(typeParameterIndirectlyConstrainedToItself.ts, 22, 13)) + diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.types b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.types index e5266083db2..00ef88dc52b 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.types +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.types @@ -92,3 +92,16 @@ class D { } >V : V >T : T +// Repro from #25740 + +type Foo = [T] extends [number] ? {} : {}; +>Foo : Foo +>T : T +>T : T + +function foo>() {} +>foo : () => void +>S : S +>Foo : Foo +>S : S +