The tuple type tests from master need to be updated to reflect the new best common type behavior from union types. This commit simply accepts the baselines as they are.
90 lines
1.2 KiB
Text
90 lines
1.2 KiB
Text
=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts ===
|
|
interface base { }
|
|
>base : base
|
|
|
|
interface base1 { i }
|
|
>base1 : base1
|
|
>i : any
|
|
|
|
class C implements base { c }
|
|
>C : C
|
|
>base : base
|
|
>c : any
|
|
|
|
class D implements base { d }
|
|
>D : D
|
|
>base : base
|
|
>d : any
|
|
|
|
class E implements base { e }
|
|
>E : E
|
|
>base : base
|
|
>e : any
|
|
|
|
class F extends C { f }
|
|
>F : F
|
|
>C : C
|
|
>f : any
|
|
|
|
class C1 implements base1 { i = "foo"; c }
|
|
>C1 : C1
|
|
>base1 : base1
|
|
>i : string
|
|
>c : any
|
|
|
|
class D1 extends C1 { i = "bar"; d }
|
|
>D1 : D1
|
|
>C1 : C1
|
|
>i : string
|
|
>d : any
|
|
|
|
var t1: [C, base];
|
|
>t1 : [C, base]
|
|
>C : C
|
|
>base : base
|
|
|
|
var t2: [C, D];
|
|
>t2 : [C, D]
|
|
>C : C
|
|
>D : D
|
|
|
|
var t3: [C1, D1];
|
|
>t3 : [C1, D1]
|
|
>C1 : C1
|
|
>D1 : D1
|
|
|
|
var t4: [base1, C1];
|
|
>t4 : [base1, C1]
|
|
>base1 : base1
|
|
>C1 : C1
|
|
|
|
var t5: [C1, F]
|
|
>t5 : [C1, F]
|
|
>C1 : C1
|
|
>F : F
|
|
|
|
var e11 = t1[4]; // base
|
|
>e11 : base
|
|
>t1[4] : base
|
|
>t1 : [C, base]
|
|
|
|
var e21 = t2[4]; // {}
|
|
>e21 : C | D
|
|
>t2[4] : C | D
|
|
>t2 : [C, D]
|
|
|
|
var e31 = t3[4]; // C1
|
|
>e31 : C1
|
|
>t3[4] : C1
|
|
>t3 : [C1, D1]
|
|
|
|
var e41 = t4[2]; // base1
|
|
>e41 : base1
|
|
>t4[2] : base1
|
|
>t4 : [base1, C1]
|
|
|
|
var e51 = t5[2]; // {}
|
|
>e51 : F | C1
|
|
>t5[2] : F | C1
|
|
>t5 : [C1, F]
|
|
|