comparison dmd2/struct.c @ 1526:54b3c1394d62

Merged dmdfe 2.031.
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 07 Jul 2009 02:26:11 +0100
parents f62347c22d81
children
comparison
equal deleted inserted replaced
1525:d28cd7c45267 1526:54b3c1394d62
44 44
45 #if IN_DMD 45 #if IN_DMD
46 stag = NULL; 46 stag = NULL;
47 sinit = NULL; 47 sinit = NULL;
48 #endif 48 #endif
49 scope = NULL;
50 isnested = 0; 49 isnested = 0;
51 vthis = NULL; 50 vthis = NULL;
52 51
53 #if DMDV2 52 #if DMDV2
54 ctor = NULL; 53 ctor = NULL;
68 } 67 }
69 68
70 void AggregateDeclaration::semantic2(Scope *sc) 69 void AggregateDeclaration::semantic2(Scope *sc)
71 { 70 {
72 //printf("AggregateDeclaration::semantic2(%s)\n", toChars()); 71 //printf("AggregateDeclaration::semantic2(%s)\n", toChars());
73 if (scope) 72 if (scope && members)
74 { error("has forward references"); 73 { error("has forward references");
75 return; 74 return;
76 } 75 }
77 if (members) 76 if (members)
78 { 77 {
87 } 86 }
88 87
89 void AggregateDeclaration::semantic3(Scope *sc) 88 void AggregateDeclaration::semantic3(Scope *sc)
90 { int i; 89 { int i;
91 90
92 // LDC 91 #if IN_LLVM
93 if (!global.params.useAvailableExternally) 92 if (!global.params.useAvailableExternally)
94 availableExternally = false; 93 availableExternally = false;
94 #endif
95 95
96 //printf("AggregateDeclaration::semantic3(%s)\n", toChars()); 96 //printf("AggregateDeclaration::semantic3(%s)\n", toChars());
97 if (members) 97 if (members)
98 { 98 {
99 sc = sc->push(this); 99 sc = sc->push(this);
286 scx = scope; // save so we don't make redundant copies 286 scx = scope; // save so we don't make redundant copies
287 scope = NULL; 287 scope = NULL;
288 } 288 }
289 289
290 parent = sc->parent; 290 parent = sc->parent;
291 type = type->semantic(loc, sc);
291 #if STRUCTTHISREF 292 #if STRUCTTHISREF
292 handle = type; 293 handle = type;
293 #else 294 #else
294 handle = type->pointerTo(); 295 handle = type->pointerTo();
295 #endif 296 #endif