Mercurial > projects > ldc
changeset 1598:20799faa301d
Merged the patch for dmd bugzilla #3620 by request of downs.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 20 Dec 2009 13:58:08 +0000 |
parents | 761bf823e59e |
children | 0a4be54234d6 a60e7d1ce3ee |
files | dmd/optimize.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/optimize.c Fri Dec 18 18:59:14 2009 +0100 +++ b/dmd/optimize.c Sun Dec 20 13:58:08 2009 +0000 @@ -211,6 +211,15 @@ } return e; } + if (e1->op == TOKdotvar) + { DotVarExp *de = (DotVarExp *) e1; + if (de->e1->op == TOKvar && de->var->isVarDeclaration()) + { + e = new SymOffExp(loc, ((VarExp*) de->e1)->var, ((VarDeclaration*) de->var)->offset); + e->type = type; + return e; + } + } #if !IN_LLVM if (e1->op == TOKvar) { VarExp *ve = (VarExp *)e1;