TypeScript/tests/baselines/reference/enumMerging.symbols
2015-10-05 16:37:45 -07:00

202 lines
8.7 KiB
Plaintext

=== tests/cases/conformance/enums/enumMerging.ts ===
// Enum with only constant members across 2 declarations with the same root module
// Enum with initializer in all declarations with constant members with the same root module
module M1 {
>M1 : Symbol(M1, Decl(enumMerging.ts, 0, 0))
enum EImpl1 {
>EImpl1 : Symbol(EImpl1, Decl(enumMerging.ts, 2, 11), Decl(enumMerging.ts, 5, 5))
A, B, C
>A : Symbol(EImpl1.A, Decl(enumMerging.ts, 3, 17))
>B : Symbol(EImpl1.B, Decl(enumMerging.ts, 4, 10))
>C : Symbol(EImpl1.C, Decl(enumMerging.ts, 4, 13))
}
enum EImpl1 {
>EImpl1 : Symbol(EImpl1, Decl(enumMerging.ts, 2, 11), Decl(enumMerging.ts, 5, 5))
D = 1, E, F
>D : Symbol(EImpl1.D, Decl(enumMerging.ts, 7, 17))
>E : Symbol(EImpl1.E, Decl(enumMerging.ts, 8, 14))
>F : Symbol(EImpl1.F, Decl(enumMerging.ts, 8, 17))
}
export enum EConst1 {
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
A = 3, B = 2, C = 1
>A : Symbol(EConst1.A, Decl(enumMerging.ts, 11, 25))
>B : Symbol(EConst1.B, Decl(enumMerging.ts, 12, 14))
>C : Symbol(EConst1.C, Decl(enumMerging.ts, 12, 21))
}
export enum EConst1 {
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
D = 7, E = 9, F = 8
>D : Symbol(EConst1.D, Decl(enumMerging.ts, 15, 25))
>E : Symbol(EConst1.E, Decl(enumMerging.ts, 16, 14))
>F : Symbol(EConst1.F, Decl(enumMerging.ts, 16, 21))
}
var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F];
>x : Symbol(x, Decl(enumMerging.ts, 19, 7))
>EConst1.A : Symbol(EConst1.A, Decl(enumMerging.ts, 11, 25))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>A : Symbol(EConst1.A, Decl(enumMerging.ts, 11, 25))
>EConst1.B : Symbol(EConst1.B, Decl(enumMerging.ts, 12, 14))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>B : Symbol(EConst1.B, Decl(enumMerging.ts, 12, 14))
>EConst1.C : Symbol(EConst1.C, Decl(enumMerging.ts, 12, 21))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>C : Symbol(EConst1.C, Decl(enumMerging.ts, 12, 21))
>EConst1.D : Symbol(EConst1.D, Decl(enumMerging.ts, 15, 25))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>D : Symbol(EConst1.D, Decl(enumMerging.ts, 15, 25))
>EConst1.E : Symbol(EConst1.E, Decl(enumMerging.ts, 16, 14))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>E : Symbol(EConst1.E, Decl(enumMerging.ts, 16, 14))
>EConst1.F : Symbol(EConst1.F, Decl(enumMerging.ts, 16, 21))
>EConst1 : Symbol(EConst1, Decl(enumMerging.ts, 9, 5), Decl(enumMerging.ts, 13, 5))
>F : Symbol(EConst1.F, Decl(enumMerging.ts, 16, 21))
}
// Enum with only computed members across 2 declarations with the same root module
module M2 {
>M2 : Symbol(M2, Decl(enumMerging.ts, 20, 1))
export enum EComp2 {
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
A = 'foo'.length, B = 'foo'.length, C = 'foo'.length
>A : Symbol(EComp2.A, Decl(enumMerging.ts, 24, 24))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
>B : Symbol(EComp2.B, Decl(enumMerging.ts, 25, 25))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
>C : Symbol(EComp2.C, Decl(enumMerging.ts, 25, 43))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
}
export enum EComp2 {
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
D = 'foo'.length, E = 'foo'.length, F = 'foo'.length
>D : Symbol(EComp2.D, Decl(enumMerging.ts, 28, 24))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
>E : Symbol(EComp2.E, Decl(enumMerging.ts, 29, 25))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
>F : Symbol(EComp2.F, Decl(enumMerging.ts, 29, 43))
>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --))
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
}
var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F];
>x : Symbol(x, Decl(enumMerging.ts, 32, 7))
>EComp2.A : Symbol(EComp2.A, Decl(enumMerging.ts, 24, 24))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>A : Symbol(EComp2.A, Decl(enumMerging.ts, 24, 24))
>EComp2.B : Symbol(EComp2.B, Decl(enumMerging.ts, 25, 25))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>B : Symbol(EComp2.B, Decl(enumMerging.ts, 25, 25))
>EComp2.C : Symbol(EComp2.C, Decl(enumMerging.ts, 25, 43))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>C : Symbol(EComp2.C, Decl(enumMerging.ts, 25, 43))
>EComp2.D : Symbol(EComp2.D, Decl(enumMerging.ts, 28, 24))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>D : Symbol(EComp2.D, Decl(enumMerging.ts, 28, 24))
>EComp2.E : Symbol(EComp2.E, Decl(enumMerging.ts, 29, 25))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>E : Symbol(EComp2.E, Decl(enumMerging.ts, 29, 25))
>EComp2.F : Symbol(EComp2.F, Decl(enumMerging.ts, 29, 43))
>EComp2 : Symbol(EComp2, Decl(enumMerging.ts, 23, 11), Decl(enumMerging.ts, 26, 5))
>F : Symbol(EComp2.F, Decl(enumMerging.ts, 29, 43))
}
// Enum with initializer in only one of two declarations with constant members with the same root module
module M3 {
>M3 : Symbol(M3, Decl(enumMerging.ts, 33, 1))
enum EInit {
>EInit : Symbol(EInit, Decl(enumMerging.ts, 36, 11), Decl(enumMerging.ts, 40, 5))
A,
>A : Symbol(EInit.A, Decl(enumMerging.ts, 37, 16))
B
>B : Symbol(EInit.B, Decl(enumMerging.ts, 38, 10))
}
enum EInit {
>EInit : Symbol(EInit, Decl(enumMerging.ts, 36, 11), Decl(enumMerging.ts, 40, 5))
C = 1, D, E
>C : Symbol(EInit.C, Decl(enumMerging.ts, 42, 16))
>D : Symbol(EInit.D, Decl(enumMerging.ts, 43, 14))
>E : Symbol(EInit.E, Decl(enumMerging.ts, 43, 17))
}
}
// Enums with same name but different root module
module M4 {
>M4 : Symbol(M4, Decl(enumMerging.ts, 45, 1))
export enum Color { Red, Green, Blue }
>Color : Symbol(Color, Decl(enumMerging.ts, 48, 11))
>Red : Symbol(Color.Red, Decl(enumMerging.ts, 49, 23))
>Green : Symbol(Color.Green, Decl(enumMerging.ts, 49, 28))
>Blue : Symbol(Color.Blue, Decl(enumMerging.ts, 49, 35))
}
module M5 {
>M5 : Symbol(M5, Decl(enumMerging.ts, 50, 1))
export enum Color { Red, Green, Blue }
>Color : Symbol(Color, Decl(enumMerging.ts, 51, 11))
>Red : Symbol(Color.Red, Decl(enumMerging.ts, 52, 23))
>Green : Symbol(Color.Green, Decl(enumMerging.ts, 52, 28))
>Blue : Symbol(Color.Blue, Decl(enumMerging.ts, 52, 35))
}
module M6.A {
>M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1))
>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11))
export enum Color { Red, Green, Blue }
>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>Red : Symbol(Color.Red, Decl(enumMerging.ts, 56, 23))
>Green : Symbol(Color.Green, Decl(enumMerging.ts, 56, 28))
>Blue : Symbol(Color.Blue, Decl(enumMerging.ts, 56, 35))
}
module M6 {
>M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1))
export module A {
>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11))
export enum Color { Yellow = 1 }
>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>Yellow : Symbol(Color.Yellow, Decl(enumMerging.ts, 60, 27))
}
var t = A.Color.Yellow;
>t : Symbol(t, Decl(enumMerging.ts, 62, 7))
>A.Color.Yellow : Symbol(A.Color.Yellow, Decl(enumMerging.ts, 60, 27))
>A.Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11))
>Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>Yellow : Symbol(A.Color.Yellow, Decl(enumMerging.ts, 60, 27))
t = A.Color.Red;
>t : Symbol(t, Decl(enumMerging.ts, 62, 7))
>A.Color.Red : Symbol(A.Color.Red, Decl(enumMerging.ts, 56, 23))
>A.Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11))
>Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21))
>Red : Symbol(A.Color.Red, Decl(enumMerging.ts, 56, 23))
}