comparison dmd/ClassDeclaration.d @ 135:af1bebfd96a4 dmd2037

dmd 2.038
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 13 Sep 2010 22:19:42 +0100
parents 60bb0fe4563e
children 90821c10b6a7
comparison
equal deleted inserted replaced
134:4251f96733f4 135:af1bebfd96a4
256 { 256 {
257 if (Type.typeinfoshared) 257 if (Type.typeinfoshared)
258 Type.typeinfoshared.error("%s", msg); 258 Type.typeinfoshared.error("%s", msg);
259 Type.typeinfoshared = this; 259 Type.typeinfoshared = this;
260 } 260 }
261
262 if (id == Id.TypeInfo_Wild)
263 {
264 if (Type.typeinfowild)
265 Type.typeinfowild.error("%s", msg);
266 Type.typeinfowild = this;
267 }
261 } 268 }
262 } 269 }
263 270
264 if (id is Id.Object_) 271 if (id is Id.Object_)
265 { 272 {
697 alignsize = PTRSIZE; 704 alignsize = PTRSIZE;
698 } 705 }
699 structsize = sc.offset; 706 structsize = sc.offset;
700 Scope scsave = sc.clone(); 707 Scope scsave = sc.clone();
701 sizeok = 0; 708 sizeok = 0;
709
710 /* Set scope so if there are forward references, we still might be able to
711 * resolve individual members like enums.
712 */
713 foreach (s; members)
714 {
715 /* There are problems doing this in the general case because
716 * Scope keeps track of things like 'offset'
717 */
718 if (s.isEnumDeclaration() || (s.isAggregateDeclaration() && s.ident))
719 {
720 //printf("setScope %s %s\n", s->kind(), s->toChars());
721 s.setScope(sc);
722 }
723 }
724
702 foreach (Dsymbol s; members) { 725 foreach (Dsymbol s; members) {
703 s.semantic(sc); 726 s.semantic(sc);
704 } 727 }
705 728
706 if (sizeok == 2) 729 if (sizeok == 2)