Mercurial > projects > ddmd
diff dmd/interpret/Util.d @ 148:fe2e1b93e88f
phobos compiles now:
* fixed upgrade mistake in interpret.Util
+ implemented missing methods in RealExp,VarExp
author | Trass3r |
---|---|
date | Wed, 15 Sep 2010 03:58:55 +0200 |
parents | af1bebfd96a4 |
children | cd48cb899aee |
line wrap: on
line diff
--- a/dmd/interpret/Util.d Tue Sep 14 23:49:12 2010 +0100 +++ b/dmd/interpret/Util.d Wed Sep 15 03:58:55 2010 +0200 @@ -144,16 +144,16 @@ ///} else { /// if (v.isConst() && v.init) ///} - { + { e = v.init.toExpression(); if (e && !e.type) e.type = v.type; } else - { + { e = v.value; - if (v.isCTFE()) - { + if (!v.isCTFE()) + { error(loc, "static variable %s cannot be read at compile time", v.toChars()); e = EXP_CANT_INTERPRET; } @@ -168,7 +168,7 @@ else if (s) { if (s.dsym.toInitializer() == s.sym) - { + { Expressions exps = new Expressions(); e = new StructLiteralExp(Loc(0), s.dsym, exps); e = e.semantic(null);