annotate dmd/TypeEnum.d @ 93:df6d0f967680

implemented a whole bunch of methods to make phobos 2.035 compile and some additional ones I came across
author Trass3r
date Mon, 30 Aug 2010 22:50:30 +0200
parents 43073c7c7769
children e28b18c23469
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.TypeEnum;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
3 import dmd.Type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.EnumDeclaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.Scope;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 import dmd.Id;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 import dmd.ErrorExp;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 import dmd.Dsymbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 import dmd.EnumMember;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 import dmd.OutBuffer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 import dmd.HdrGenState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 import dmd.Expression;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 import dmd.Identifier;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 import dmd.MATCH;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 import dmd.OutBuffer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 import dmd.CppMangleState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 import dmd.TypeInfoDeclaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 import dmd.TypeInfoEnumDeclaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 import dmd.ArrayTypes;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 import dmd.TY;
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
22 import dmd.MOD;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 import dmd.Util;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 import dmd.backend.TYPE;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 class TypeEnum : Type
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 EnumDeclaration sym;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 this(EnumDeclaration sym)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 super(TY.Tenum);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 this.sym = sym;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 version (DumbClone) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 } else {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 Type clone()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 }
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
44 override Type syntaxCopy()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
49 override ulong size(Loc loc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 if (!sym.memtype)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 error(loc, "enum %s is forward referenced", sym.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 return 4;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 return sym.memtype.size(loc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
59 override uint alignsize()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
61 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
62 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
64 override string toChars()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
65 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
66 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
69 override Type semantic(Loc loc, Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
71 //printf("TypeEnum::semantic() %s\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 //sym.semantic(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 return merge();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
75
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
76 override Dsymbol toDsymbol(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78 return sym;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
79 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
80
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
81 override void toDecoBuffer(OutBuffer buf, int flag)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
82 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
83 string name = sym.mangle();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
84 Type.toDecoBuffer(buf, flag);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
85 buf.printf("%s", name);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
86 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
87
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
88 override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 {
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
90 if (mod != this.mod)
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
91 {
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
92 toCBuffer3(buf, hgs, mod);
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
93 return;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
94 }
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 0
diff changeset
95 buf.writestring(sym.toChars());
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
97
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
98 override Expression dotExp(Scope sc, Expression e, Identifier ident)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
99 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100 version (LOGDOTEXP) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
101 printf("TypeEnum::dotExp(e = '%s', ident = '%s') '%s'\n", e.toChars(), ident.toChars(), toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
102 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
103 Dsymbol s = sym.search(e.loc, ident, 0);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
104 if (!s)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
105 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
106 if (ident is Id.max ||
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
107 ident is Id.min ||
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
108 ident is Id.init_ ||
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
109 ident is Id.stringof_ ||
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
110 !sym.memtype
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
111 )
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
112 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
113 return getProperty(e.loc, ident);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
114 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
115
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116 return sym.memtype.dotExp(sc, e, ident);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
119 EnumMember m = s.isEnumMember();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
120 Expression em = m.value.copy();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 em.loc = e.loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
122 return em;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
123 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
124
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
125 override Expression getProperty(Loc loc, Identifier ident)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
126 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
127 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
129
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
130 override bool isintegral()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
131 {
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
132 return sym.memtype.isintegral();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
133 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
134
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
135 override bool isfloating()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
136 {
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
137 return sym.memtype.isfloating();
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
138 }
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
139
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
140 override bool isreal()
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
141 {
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
142 return sym.memtype.isreal();
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
143 }
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
144
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
145 override bool isimaginary()
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
146 {
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
147 return sym.memtype.isimaginary();
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
148 }
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
149
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
150 override bool iscomplex()
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
151 {
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
152 return sym.memtype.iscomplex();
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
153 }
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
154
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
155 override bool checkBoolean()
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
156 {
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
157 return sym.memtype.checkBoolean();
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
158 }
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
159
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
160 override bool isAssignable()
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
161 {
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
162 return sym.memtype.isAssignable();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
165 override bool isscalar()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
166 {
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
167 return sym.memtype.isscalar();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
170 override bool isunsigned()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
171 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 return sym.memtype.isunsigned();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
173 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
174
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
175 override MATCH implicitConvTo(Type to)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
177 MATCH m;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
178
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
179 //printf("TypeEnum::implicitConvTo()\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
180 if (ty == to.ty && sym == (cast(TypeEnum)to).sym)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181 m = (mod == to.mod) ? MATCHexact : MATCHconst;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
182 else if (sym.memtype.implicitConvTo(to))
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
183 m = MATCHconvert; // match with conversions
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
184 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185 m = MATCHnomatch; // no match
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186 return m;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
188
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
189 override MATCH constConv(Type to)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
191 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
193
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
194 override Type toBasetype()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
195 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
196 if (!sym.memtype)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
198 debug writef("2: ");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
199 error(sym.loc, "enum %s is forward referenced", sym.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
200 return tint32;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
203 return sym.memtype.toBasetype();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
204 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
206 override Expression defaultInit(Loc loc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
208 version (LOGDEFAULTINIT) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
209 printf("TypeEnum::defaultInit() '%s'\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
210 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 // Initialize to first member of enum
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212 //printf("%s\n", sym.defaultval.type.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
213 if (!sym.defaultval)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
214 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215 error(loc, "forward reference of %s.init", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
216 return new ErrorExp();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
218 return sym.defaultval;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
219 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
220
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
221 override bool isZeroInit(Loc loc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
222 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
223 if (!sym.defaultval)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
224 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
225 debug writef("3: ");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
226 error(loc, "enum %s is forward referenced", sym.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
227 return 0;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
228 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
229 return sym.defaultval.isBool(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
230 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
231
93
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
232 override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
233 {
93
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
234 // Extra check
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
235 if (tparam && tparam.ty == Tenum)
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
236 {
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
237 TypeEnum tp = cast(TypeEnum)tparam;
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
238
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
239 if (sym != tp.sym)
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
240 return MATCHnomatch;
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
241 }
df6d0f967680 implemented a whole bunch of methods to make phobos 2.035 compile
Trass3r
parents: 79
diff changeset
242 return Type.deduceType(sc, tparam, parameters, dedtypes);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
243 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
244
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
245 override TypeInfoDeclaration getTypeInfoDeclaration()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
246 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
247 return new TypeInfoEnumDeclaration(this);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
248 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
249
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
250 override bool hasPointers()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
251 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
252 return toBasetype().hasPointers();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
253 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
254
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
255 version (CPP_MANGLE) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
256 void toCppMangle(OutBuffer buf, CppMangleState* cms)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
257 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
258 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
259 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
260 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
261
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
262 override type* toCtype()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
263 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
264 return sym.memtype.toCtype();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
265 }
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
266 }