2014-10-09 00:37:01 +02:00
|
|
|
=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts ===
|
|
|
|
interface base { }
|
2015-04-13 22:54:22 +02:00
|
|
|
>base : base, Symbol(base,Decl(bestCommonTypeOfTuple2.ts,0,0))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
interface base1 { i }
|
2015-04-13 22:54:22 +02:00
|
|
|
>base1 : base1, Symbol(base1,Decl(bestCommonTypeOfTuple2.ts,0,18))
|
|
|
|
>i : any, Symbol(i,Decl(bestCommonTypeOfTuple2.ts,1,17))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class C implements base { c }
|
2015-04-13 22:54:22 +02:00
|
|
|
>C : C, Symbol(C,Decl(bestCommonTypeOfTuple2.ts,1,21))
|
|
|
|
>base : base, Symbol(base,Decl(bestCommonTypeOfTuple2.ts,0,0))
|
|
|
|
>c : any, Symbol(c,Decl(bestCommonTypeOfTuple2.ts,2,25))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class D implements base { d }
|
2015-04-13 22:54:22 +02:00
|
|
|
>D : D, Symbol(D,Decl(bestCommonTypeOfTuple2.ts,2,29))
|
|
|
|
>base : base, Symbol(base,Decl(bestCommonTypeOfTuple2.ts,0,0))
|
|
|
|
>d : any, Symbol(d,Decl(bestCommonTypeOfTuple2.ts,3,25))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class E implements base { e }
|
2015-04-13 22:54:22 +02:00
|
|
|
>E : E, Symbol(E,Decl(bestCommonTypeOfTuple2.ts,3,29))
|
|
|
|
>base : base, Symbol(base,Decl(bestCommonTypeOfTuple2.ts,0,0))
|
|
|
|
>e : any, Symbol(e,Decl(bestCommonTypeOfTuple2.ts,4,25))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class F extends C { f }
|
2015-04-13 22:54:22 +02:00
|
|
|
>F : F, Symbol(F,Decl(bestCommonTypeOfTuple2.ts,4,29))
|
|
|
|
>C : C, Symbol(C,Decl(bestCommonTypeOfTuple2.ts,1,21))
|
|
|
|
>f : any, Symbol(f,Decl(bestCommonTypeOfTuple2.ts,5,19))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class C1 implements base1 { i = "foo"; c }
|
2015-04-13 22:54:22 +02:00
|
|
|
>C1 : C1, Symbol(C1,Decl(bestCommonTypeOfTuple2.ts,5,23))
|
|
|
|
>base1 : base1, Symbol(base1,Decl(bestCommonTypeOfTuple2.ts,0,18))
|
|
|
|
>i : string, Symbol(i,Decl(bestCommonTypeOfTuple2.ts,7,27))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"foo" : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>c : any, Symbol(c,Decl(bestCommonTypeOfTuple2.ts,7,38))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
class D1 extends C1 { i = "bar"; d }
|
2015-04-13 22:54:22 +02:00
|
|
|
>D1 : D1, Symbol(D1,Decl(bestCommonTypeOfTuple2.ts,7,42))
|
|
|
|
>C1 : C1, Symbol(C1,Decl(bestCommonTypeOfTuple2.ts,5,23))
|
|
|
|
>i : string, Symbol(i,Decl(bestCommonTypeOfTuple2.ts,8,21))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"bar" : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>d : any, Symbol(d,Decl(bestCommonTypeOfTuple2.ts,8,32))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var t1: [C, base];
|
2015-04-13 22:54:22 +02:00
|
|
|
>t1 : [C, base], Symbol(t1,Decl(bestCommonTypeOfTuple2.ts,10,3))
|
|
|
|
>C : C, Symbol(C,Decl(bestCommonTypeOfTuple2.ts,1,21))
|
|
|
|
>base : base, Symbol(base,Decl(bestCommonTypeOfTuple2.ts,0,0))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var t2: [C, D];
|
2015-04-13 22:54:22 +02:00
|
|
|
>t2 : [C, D], Symbol(t2,Decl(bestCommonTypeOfTuple2.ts,11,3))
|
|
|
|
>C : C, Symbol(C,Decl(bestCommonTypeOfTuple2.ts,1,21))
|
|
|
|
>D : D, Symbol(D,Decl(bestCommonTypeOfTuple2.ts,2,29))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var t3: [C1, D1];
|
2015-04-13 22:54:22 +02:00
|
|
|
>t3 : [C1, D1], Symbol(t3,Decl(bestCommonTypeOfTuple2.ts,12,3))
|
|
|
|
>C1 : C1, Symbol(C1,Decl(bestCommonTypeOfTuple2.ts,5,23))
|
|
|
|
>D1 : D1, Symbol(D1,Decl(bestCommonTypeOfTuple2.ts,7,42))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var t4: [base1, C1];
|
2015-04-13 22:54:22 +02:00
|
|
|
>t4 : [base1, C1], Symbol(t4,Decl(bestCommonTypeOfTuple2.ts,13,3))
|
|
|
|
>base1 : base1, Symbol(base1,Decl(bestCommonTypeOfTuple2.ts,0,18))
|
|
|
|
>C1 : C1, Symbol(C1,Decl(bestCommonTypeOfTuple2.ts,5,23))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var t5: [C1, F]
|
2015-04-13 22:54:22 +02:00
|
|
|
>t5 : [C1, F], Symbol(t5,Decl(bestCommonTypeOfTuple2.ts,14,3))
|
|
|
|
>C1 : C1, Symbol(C1,Decl(bestCommonTypeOfTuple2.ts,5,23))
|
|
|
|
>F : F, Symbol(F,Decl(bestCommonTypeOfTuple2.ts,4,29))
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var e11 = t1[4]; // base
|
2015-04-13 22:54:22 +02:00
|
|
|
>e11 : base, Symbol(e11,Decl(bestCommonTypeOfTuple2.ts,16,3))
|
2014-10-09 00:37:01 +02:00
|
|
|
>t1[4] : base
|
2015-04-13 22:54:22 +02:00
|
|
|
>t1 : [C, base], Symbol(t1,Decl(bestCommonTypeOfTuple2.ts,10,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var e21 = t2[4]; // {}
|
2015-04-13 22:54:22 +02:00
|
|
|
>e21 : C | D, Symbol(e21,Decl(bestCommonTypeOfTuple2.ts,17,3))
|
2014-10-09 00:37:01 +02:00
|
|
|
>t2[4] : C | D
|
2015-04-13 22:54:22 +02:00
|
|
|
>t2 : [C, D], Symbol(t2,Decl(bestCommonTypeOfTuple2.ts,11,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var e31 = t3[4]; // C1
|
2015-04-13 22:54:22 +02:00
|
|
|
>e31 : C1, Symbol(e31,Decl(bestCommonTypeOfTuple2.ts,18,3))
|
2014-10-09 00:37:01 +02:00
|
|
|
>t3[4] : C1
|
2015-04-13 22:54:22 +02:00
|
|
|
>t3 : [C1, D1], Symbol(t3,Decl(bestCommonTypeOfTuple2.ts,12,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var e41 = t4[2]; // base1
|
2015-04-13 22:54:22 +02:00
|
|
|
>e41 : base1, Symbol(e41,Decl(bestCommonTypeOfTuple2.ts,19,3))
|
2014-10-09 00:37:01 +02:00
|
|
|
>t4[2] : base1
|
2015-04-13 22:54:22 +02:00
|
|
|
>t4 : [base1, C1], Symbol(t4,Decl(bestCommonTypeOfTuple2.ts,13,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
2014-10-09 00:37:01 +02:00
|
|
|
|
|
|
|
var e51 = t5[2]; // {}
|
2015-04-13 22:54:22 +02:00
|
|
|
>e51 : F | C1, Symbol(e51,Decl(bestCommonTypeOfTuple2.ts,20,3))
|
2014-10-09 00:37:01 +02:00
|
|
|
>t5[2] : F | C1
|
2015-04-13 22:54:22 +02:00
|
|
|
>t5 : [C1, F], Symbol(t5,Decl(bestCommonTypeOfTuple2.ts,14,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
2014-10-09 00:37:01 +02:00
|
|
|
|