comparison dmd/SymOffExp.d @ 73:ef02e2e203c2

Updating to dmd2.033
author korDen
date Sat, 28 Aug 2010 19:42:41 +0400
parents 2e2a5c3f943a
children 6da99741178e
comparison
equal deleted inserted replaced
72:2e2a5c3f943a 73:ef02e2e203c2
26 26
27 class SymOffExp : SymbolExp 27 class SymOffExp : SymbolExp
28 { 28 {
29 uint offset; 29 uint offset;
30 30
31 this(Loc loc, Declaration var, uint offset, int hasOverloads = 0) 31 this(Loc loc, Declaration var, uint offset, bool hasOverloads = false)
32 { 32 {
33 super(loc, TOK.TOKsymoff, SymOffExp.sizeof, var, hasOverloads); 33 super(loc, TOK.TOKsymoff, SymOffExp.sizeof, var, hasOverloads);
34 34
35 this.offset = offset; 35 this.offset = offset;
36 VarDeclaration v = var.isVarDeclaration(); 36 VarDeclaration v = var.isVarDeclaration();
134 override Expression castTo(Scope sc, Type t) 134 override Expression castTo(Scope sc, Type t)
135 { 135 {
136 static if (false) { 136 static if (false) {
137 printf("SymOffExp::castTo(this=%s, type=%s, t=%s)\n", toChars(), type.toChars(), t.toChars()); 137 printf("SymOffExp::castTo(this=%s, type=%s, t=%s)\n", toChars(), type.toChars(), t.toChars());
138 } 138 }
139 if (type == t && hasOverloads == 0) 139 if (type == t && !hasOverloads)
140 return this; 140 return this;
141 141
142 Expression e; 142 Expression e;
143 Type tb = t.toBasetype(); 143 Type tb = t.toBasetype();
144 Type typeb = type.toBasetype(); 144 Type typeb = type.toBasetype();
197 } 197 }
198 else 198 else
199 { 199 {
200 e = copy(); 200 e = copy();
201 e.type = t; 201 e.type = t;
202 (cast(SymOffExp)e).hasOverloads = 0; 202 (cast(SymOffExp)e).hasOverloads = false;
203 } 203 }
204 return e; 204 return e;
205 } 205 }
206 206
207 override void scanForNestedRef(Scope sc) 207 override void scanForNestedRef(Scope sc)