Mercurial > projects > ddmd
comparison dmd/TypeAArray.d @ 179:cd48cb899aee
Updated to dmd2.040
author | korDen |
---|---|
date | Sun, 17 Oct 2010 20:56:07 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
comparison
equal
deleted
inserted
replaced
178:e3afd1303184 | 179:cd48cb899aee |
---|---|
8 import dmd.TypeInfoAssociativeArrayDeclaration; | 8 import dmd.TypeInfoAssociativeArrayDeclaration; |
9 import dmd.Expression; | 9 import dmd.Expression; |
10 import dmd.Scope; | 10 import dmd.Scope; |
11 import dmd.StructDeclaration; | 11 import dmd.StructDeclaration; |
12 import dmd.Loc; | 12 import dmd.Loc; |
13 import dmd.DotTemplateInstanceExp; | |
14 import dmd.IdentifierExp; | |
13 import dmd.Global; | 15 import dmd.Global; |
14 import dmd.Dsymbol; | 16 import dmd.Dsymbol; |
15 import dmd.Type; | 17 import dmd.Type; |
16 import dmd.TypeSArray; | 18 import dmd.TypeSArray; |
17 import dmd.OutBuffer; | 19 import dmd.OutBuffer; |
167 { | 169 { |
168 /* This is really a proxy for the template instance AssocArray!(index, next) | 170 /* This is really a proxy for the template instance AssocArray!(index, next) |
169 * But the instantiation can fail if it is a template specialization field | 171 * But the instantiation can fail if it is a template specialization field |
170 * which has Tident's instead of real types. | 172 * which has Tident's instead of real types. |
171 */ | 173 */ |
172 TemplateInstance ti = new TemplateInstance(loc, Id.AssociativeArray); | |
173 Objects tiargs = new Objects(); | 174 Objects tiargs = new Objects(); |
174 tiargs.push(index); | 175 tiargs.push(index); |
175 tiargs.push(next); | 176 tiargs.push(next); |
176 ti.tiargs = tiargs; | 177 |
177 | 178 // Create .AssociativeArray!(index, next) |
179 DotTemplateInstanceExp dti = new DotTemplateInstanceExp(loc, | |
180 new IdentifierExp(loc, Id.empty), | |
181 Id.AssociativeArray, | |
182 tiargs); | |
183 dti.semantic(sc); | |
184 TemplateInstance ti = dti.ti; | |
185 | |
178 ti.semantic(sc); | 186 ti.semantic(sc); |
179 ti.semantic2(sc); | 187 ti.semantic2(sc); |
180 ti.semantic3(sc); | 188 ti.semantic3(sc); |
181 impl = ti.toAlias().isStructDeclaration(); | 189 impl = ti.toAlias().isStructDeclaration(); |
182 debug | 190 debug |