Mercurial > projects > ldc
comparison dmd/struct.c @ 1625:79f64d5fee9e
Merge DMD r319: bugzilla 400 forward reference error...
bugzilla 400 forward reference error; no propety X for type Y (struct
within struct).
---
dmd/class.c | 19 +++++++++++++++++--
dmd/struct.c | 16 ++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:22 -0300 |
parents | ae8a94d87ca9 |
children | 6c36e3f49b28 |
comparison
equal
deleted
inserted
replaced
1624:ae8a94d87ca9 | 1625:79f64d5fee9e |
---|---|
305 sc2->inunion = 1; | 305 sc2->inunion = 1; |
306 sc2->protection = PROTpublic; | 306 sc2->protection = PROTpublic; |
307 sc2->explicitProtection = 0; | 307 sc2->explicitProtection = 0; |
308 | 308 |
309 int members_dim = members->dim; | 309 int members_dim = members->dim; |
310 | |
311 /* Set scope so if there are forward references, we still might be able to | |
312 * resolve individual members like enums. | |
313 */ | |
314 for (int i = 0; i < members_dim; i++) | |
315 { Dsymbol *s = (Dsymbol *)members->data[i]; | |
316 /* There are problems doing this in the general case because | |
317 * Scope keeps track of things like 'offset' | |
318 */ | |
319 if (s->isEnumDeclaration() || (s->isAggregateDeclaration() && s->ident)) | |
320 { | |
321 //printf("setScope %s %s\n", s->kind(), s->toChars()); | |
322 s->setScope(sc2); | |
323 } | |
324 } | |
325 | |
310 for (i = 0; i < members_dim; i++) | 326 for (i = 0; i < members_dim; i++) |
311 { | 327 { |
312 Dsymbol *s = (Dsymbol *)members->data[i]; | 328 Dsymbol *s = (Dsymbol *)members->data[i]; |
313 s->semantic(sc2); | 329 s->semantic(sc2); |
314 if (isUnionDeclaration()) | 330 if (isUnionDeclaration()) |