Accept new baselines

This commit is contained in:
Anders Hejlsberg
2016-08-19 09:41:52 -07:00
parent 1a17270a7d
commit bd1b930f70
3 changed files with 12 additions and 6 deletions
@@ -53,7 +53,7 @@ function rawr(dino: RexOrRaptor) {
}
throw "Unexpected " + dino;
>"Unexpected " + dino : string
>"Unexpected " + dino : never
>"Unexpected " : string
>dino : never
}
@@ -1,10 +1,13 @@
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(5,5): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(31,12): error TS2352: Type 'SomeOther' cannot be converted to type 'SomeBase'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(31,12): error TS2352: Type 'SomeOther' cannot be converted to type 'SomeBase'.
Property 'p' is missing in type 'SomeOther'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(35,15): error TS2352: Type 'SomeOther' cannot be converted to type 'SomeDerived'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(35,15): error TS2352: Type 'SomeOther' cannot be converted to type 'SomeDerived'.
Property 'x' is missing in type 'SomeOther'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(37,13): error TS2352: Type 'SomeDerived' cannot be converted to type 'SomeOther'.
Property 'q' is missing in type 'SomeDerived'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): error TS2352: Type 'SomeBase' cannot be converted to type 'SomeOther'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(38,13): error TS2352: Type 'SomeBase' cannot be converted to type 'SomeOther'.
Property 'q' is missing in type 'SomeBase'.
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,5): error TS2304: Cannot find name 'numOrStr'.
@@ -23,7 +26,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): err
tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): error TS1005: ';' expected.
==== tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts (18 errors) ====
==== tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts (21 errors) ====
// Function call whose argument is a 1 arg generic function call with explicit type arguments
function fn1<T>(t: T) { }
function fn2(t: any) { }
@@ -58,6 +61,8 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err
someBase = <SomeBase>someBase;
someBase = <SomeBase>someOther; // Error
~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeOther' cannot be converted to type 'SomeBase'.
~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeOther' cannot be converted to type 'SomeBase'.
!!! error TS2352: Property 'p' is missing in type 'SomeOther'.
@@ -65,6 +70,8 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err
someDerived = <SomeDerived>someBase;
someDerived = <SomeDerived>someOther; // Error
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeOther' cannot be converted to type 'SomeDerived'.
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeOther' cannot be converted to type 'SomeDerived'.
!!! error TS2352: Property 'x' is missing in type 'SomeOther'.
@@ -74,6 +81,8 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err
!!! error TS2352: Property 'q' is missing in type 'SomeDerived'.
someOther = <SomeOther>someBase; // Error
~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeBase' cannot be converted to type 'SomeOther'.
~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'SomeBase' cannot be converted to type 'SomeOther'.
!!! error TS2352: Property 'q' is missing in type 'SomeBase'.
someOther = <SomeOther>someOther;
@@ -1,10 +1,9 @@
tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts(22,10): error TS2354: No best common type exists among return expressions.
tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts(31,10): error TS2354: No best common type exists among return expressions.
tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts(49,10): error TS2354: No best common type exists among return expressions.
tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts(139,17): error TS2339: Property 'toString' does not exist on type 'never'.
==== tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts (4 errors) ====
==== tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts (3 errors) ====
// In the true branch statement of an 'if' statement,
// the type of a variable or parameter is narrowed by any type guard in the 'if' condition when true.
// In the false branch statement of an 'if' statement,
@@ -150,7 +149,5 @@ tests/cases/conformance/expressions/typeGuards/typeGuardsInIfStatement.ts(139,17
return typeof x === "number"
? x.toString() // number
: x.toString(); // boolean | string
~~~~~~~~
!!! error TS2339: Property 'toString' does not exist on type 'never'.
}
}