mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 20:01:02 -05:00
Accept new baselines
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts(9,15): error TS2345: Argument of type '2' is not assignable to parameter of type 'string | 1'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts(13,15): error TS2345: Argument of type 'number | "hello"' is not assignable to parameter of type 'string | 1'.
|
||||
Type 'number' is not assignable to type 'string | 1'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts (1 errors) ====
|
||||
// Verify that inferences made *to* a type parameter in a union type are secondary
|
||||
// to inferences made directly to that type parameter
|
||||
|
||||
@@ -19,9 +17,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference
|
||||
var a2 = f(1, "hello");
|
||||
var a3: number;
|
||||
var a3 = f(1, a1 || "hello");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'number | "hello"' is not assignable to parameter of type 'string | 1'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string | 1'.
|
||||
var a4: any;
|
||||
var a4 = f(undefined, "abc");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user