Mercurial > projects > ldc
comparison dmd/expression.c @ 1612:081c48283153
Merge DMD r278: bugzilla 370 Compiler stack overflow on recursive...
bugzilla 370 Compiler stack overflow on recursive typeof in function
declaration.
---
dmd/expression.c | 1 +
dmd/mtype.c | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:21 -0300 |
parents | 3f728445fc42 |
children | c94049033c20 |
comparison
equal
deleted
inserted
replaced
1611:3f728445fc42 | 1612:081c48283153 |
---|---|
2264 if (f) | 2264 if (f) |
2265 { //printf("'%s' is a function\n", f->toChars()); | 2265 { //printf("'%s' is a function\n", f->toChars()); |
2266 if (!f->type->deco) | 2266 if (!f->type->deco) |
2267 { | 2267 { |
2268 error("forward reference to %s", toChars()); | 2268 error("forward reference to %s", toChars()); |
2269 return new ErrorExp(); | |
2269 } | 2270 } |
2270 return new VarExp(loc, f); | 2271 return new VarExp(loc, f); |
2271 } | 2272 } |
2272 cd = s->isClassDeclaration(); | 2273 cd = s->isClassDeclaration(); |
2273 if (cd && thiscd && cd->isBaseOf(thiscd, NULL) && sc->func->needThis()) | 2274 if (cd && thiscd && cd->isBaseOf(thiscd, NULL) && sc->func->needThis()) |