Mercurial > projects > ddmd
diff dmd/BinExp.d @ 60:a8740d0dbea4
TypeTypeof.toCBuffer2
BinExp.semanticp bug fixed
author | korDen |
---|---|
date | Mon, 23 Aug 2010 02:48:05 +0400 |
parents | 51605de93870 |
children | cab4c37afb89 |
line wrap: on
line diff
--- a/dmd/BinExp.d Sat Aug 21 14:54:46 2010 +0400 +++ b/dmd/BinExp.d Mon Aug 23 02:48:05 2010 +0400 @@ -78,7 +78,7 @@ int typeMerge(Scope sc, Expression e, Type* pt, Expression* pe1, Expression* pe2) { - //printf("typeMerge() %s op %s\n", (*pe1).toChars(), (*pe2).toChars()); + //printf("typeMerge() %.*s op %.*s\n", (*pe1).toChars(), (*pe2).toChars()); //dump(0); Expression e1 = (*pe1).integralPromotions(sc); @@ -385,7 +385,7 @@ Expression semantic(Scope sc) { version (LOGSEMANTIC) { - printf("BinExp.semantic('%s')\n", toChars()); + printf("BinExp.semantic('%.*s')\n", toChars()); } e1 = e1.semantic(sc); if (!e1.type && !(op == TOK.TOKassign && e1.op == TOK.TOKdottd)) // a.template = e2 @@ -404,22 +404,10 @@ Expression semanticp(Scope sc) { -version (LOGSEMANTIC) { - printf("BinExp.semantic('%s')\n", toChars()); -} - e1 = e1.semantic(sc); - if (!e1.type && - !(op == TOK.TOKassign && e1.op == TOK.TOKdottd)) // a.template = e2 - { - error("%s has no value", e1.toChars()); - e1.type = Type.terror; - } - e2 = e2.semantic(sc); - if (!e2.type) - { - error("%s has no value", e2.toChars()); - e2.type = Type.terror; - } + BinExp.semantic(sc); + + e1 = resolveProperties(sc, e1); + e2 = resolveProperties(sc, e2); return this; }