comparison dmd2/scope.c @ 1452:638d16625da2

LDC 2 compiles again.
author Robert Clipsham <robert@octarineparrot.com>
date Sat, 30 May 2009 17:23:32 +0100
parents f04dde6e882c
children 54b3c1394d62
comparison
equal deleted inserted replaced
1423:42bd767ec5a4 1452:638d16625da2
50 this->scopesym = NULL; 50 this->scopesym = NULL;
51 this->sd = NULL; 51 this->sd = NULL;
52 this->enclosing = NULL; 52 this->enclosing = NULL;
53 this->parent = NULL; 53 this->parent = NULL;
54 this->sw = NULL; 54 this->sw = NULL;
55 this->tf = NULL; 55 this->enclosingFinally = NULL;
56 this->tfOfTry = NULL; 56 this->enclosingScopeExit = NULL;
57 this->tinst = NULL; 57 this->tinst = NULL;
58 this->sbreak = NULL; 58 this->sbreak = NULL;
59 this->scontinue = NULL; 59 this->scontinue = NULL;
60 this->fes = NULL; 60 this->fes = NULL;
61 this->structalign = global.structalign; 61 this->structalign = global.structalign;
89 this->func = enclosing->func; 89 this->func = enclosing->func;
90 this->parent = enclosing->parent; 90 this->parent = enclosing->parent;
91 this->scopesym = NULL; 91 this->scopesym = NULL;
92 this->sd = NULL; 92 this->sd = NULL;
93 this->sw = enclosing->sw; 93 this->sw = enclosing->sw;
94 this->tf = enclosing->tf; 94 this->enclosingFinally = enclosing->enclosingFinally;
95 this->tfOfTry = enclosing->tfOfTry; 95 this->enclosingScopeExit = enclosing->enclosingScopeExit;
96 this->tinst = enclosing->tinst; 96 this->tinst = enclosing->tinst;
97 this->sbreak = enclosing->sbreak; 97 this->sbreak = enclosing->sbreak;
98 this->scontinue = enclosing->scontinue; 98 this->scontinue = enclosing->scontinue;
99 this->fes = enclosing->fes; 99 this->fes = enclosing->fes;
100 this->structalign = enclosing->structalign; 100 this->structalign = enclosing->structalign;
255 ident == Id::length && 255 ident == Id::length &&
256 sc->scopesym->isArrayScopeSymbol() && 256 sc->scopesym->isArrayScopeSymbol() &&
257 sc->enclosing && 257 sc->enclosing &&
258 sc->enclosing->search(loc, ident, NULL)) 258 sc->enclosing->search(loc, ident, NULL))
259 { 259 {
260 // WTF ? 260 warning(s->loc, "array 'length' hides other 'length' name in outer scope");
261 if (global.params.warnings)
262 fprintf(stdmsg, "warning - ");
263 error(s->loc, "array 'length' hides other 'length' name in outer scope");
264 } 261 }
265 262
266 //printf("\tfound %s.%s, kind = '%s'\n", s->parent ? s->parent->toChars() : "", s->toChars(), s->kind()); 263 //printf("\tfound %s.%s, kind = '%s'\n", s->parent ? s->parent->toChars() : "", s->toChars(), s->kind());
267 if (pscopesym) 264 if (pscopesym)
268 *pscopesym = sc->scopesym; 265 *pscopesym = sc->scopesym;