File: enumMergingErrors.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (111 lines) | stat: -rw-r--r-- 1,686 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
=== tests/cases/conformance/enums/enumMergingErrors.ts ===
// Enum with constant, computed, constant members split across 3 declarations with the same root module
module M {
>M : typeof M

    export enum E1 { A = 0 }
>E1 : E1
>A : E1.A
>0 : 0

    export enum E2 { C }
>E2 : E2
>C : E2.C

    export enum E3 { A = 0 }
>E3 : E3
>A : E3.A
>0 : 0
}
module M {
>M : typeof M

    export enum E1 { B = 'foo'.length }
>E1 : E1
>B : E1.B
>'foo'.length : number
>'foo' : "foo"
>length : number

    export enum E2 { B = 'foo'.length }
>E2 : E2
>B : E2.B
>'foo'.length : number
>'foo' : "foo"
>length : number

    export enum E3 { C }
>E3 : E3
>C : E3.A
}
module M {
>M : typeof M

    export enum E1 { C }
>E1 : E1
>C : E1.A

    export enum E2 { A = 0 }
>E2 : E2
>A : E2.C
>0 : 0

    export enum E3 { B = 'foo'.length }
>E3 : E3
>B : E3.B
>'foo'.length : number
>'foo' : "foo"
>length : number
}

// Enum with no initializer in either declaration with constant members with the same root module
module M1 {
>M1 : typeof M1

    export enum E1 { A = 0 }
>E1 : E1
>A : E1.A
>0 : 0
}
module M1 {
>M1 : typeof M1

    export enum E1 { B }
>E1 : E1
>B : E1.A
}
module M1 {
>M1 : typeof M1

    export enum E1 { C }
>E1 : E1
>C : E1.A
}


// Enum with initializer in only one of three declarations with constant members with the same root module
module M2 {
>M2 : typeof M2

    export enum E1 { A }
>E1 : E1
>A : E1.A
}
module M2 {
>M2 : typeof M2

    export enum E1 { B = 0 }
>E1 : E1
>B : E1.A
>0 : 0
}
module M2 {
>M2 : typeof M2

    export enum E1 { C }
>E1 : E1
>C : E1.A
}