Mercurial > projects > ddmd
diff dmd/Expression.d @ 109:ceda59b4d255
expression.c changes, now only ddoc should be left
author | Trass3r |
---|---|
date | Tue, 31 Aug 2010 22:08:52 +0200 |
parents | ae5b11064a9a |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/Expression.d Tue Aug 31 21:41:01 2010 +0200 +++ b/dmd/Expression.d Tue Aug 31 22:08:52 2010 +0200 @@ -135,6 +135,11 @@ if (t.ty == TY.Tfunction || e.op == TOK.TOKoverloadset) { +static if(false) +{ + if (t.ty == Tfunction && !(cast(TypeFunction)t).isproperty) + error(e.loc, "not a property %s\n", e.toChars()); +} e = new CallExp(e.loc, e); e = e.semantic(sc); } @@ -737,14 +742,13 @@ Expression checkToPointer() { - Expression e; - Type tb; + //writef("Expression::checkToPointer()\n"); + Expression e = this; - //printf("Expression::checkToPointer()\n"); - e = this; - +version(SARRAYVALUE) {} else +{ // If C static array, convert to pointer - tb = type.toBasetype(); + Type tb = type.toBasetype(); if (tb.ty == Tsarray) { TypeSArray ts = cast(TypeSArray)tb; @@ -754,6 +758,7 @@ e = new AddrExp(loc, this); e.type = ts.next.pointerTo(); } +} return e; }