Mercurial > projects > ldc
comparison dmd/expression.c @ 779:ef7fe998f9b3
Fix return type of OrOr and AndAndExp being set incorrectly if rhs is void. Thanks wilsonk!
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 22 Nov 2008 18:38:13 +0100 |
parents | 55f6c2e454d7 |
children | 661384d6a936 |
comparison
equal
deleted
inserted
replaced
778:4adf0f742896 | 779:ef7fe998f9b3 |
---|---|
8591 sc->mergeCallSuper(loc, cs1); | 8591 sc->mergeCallSuper(loc, cs1); |
8592 e2 = resolveProperties(sc, e2); | 8592 e2 = resolveProperties(sc, e2); |
8593 e2 = e2->checkToPointer(); | 8593 e2 = e2->checkToPointer(); |
8594 | 8594 |
8595 type = Type::tboolean; | 8595 type = Type::tboolean; |
8596 if (e1->type->ty == Tvoid) | 8596 if (e2->type->ty == Tvoid) |
8597 type = Type::tvoid; | 8597 type = Type::tvoid; |
8598 if (e2->op == TOKtype || e2->op == TOKimport) | 8598 if (e2->op == TOKtype || e2->op == TOKimport) |
8599 error("%s is not an expression", e2->toChars()); | 8599 error("%s is not an expression", e2->toChars()); |
8600 return this; | 8600 return this; |
8601 } | 8601 } |
8656 sc->mergeCallSuper(loc, cs1); | 8656 sc->mergeCallSuper(loc, cs1); |
8657 e2 = resolveProperties(sc, e2); | 8657 e2 = resolveProperties(sc, e2); |
8658 e2 = e2->checkToPointer(); | 8658 e2 = e2->checkToPointer(); |
8659 | 8659 |
8660 type = Type::tboolean; | 8660 type = Type::tboolean; |
8661 if (e1->type->ty == Tvoid) | 8661 if (e2->type->ty == Tvoid) |
8662 type = Type::tvoid; | 8662 type = Type::tvoid; |
8663 if (e2->op == TOKtype || e2->op == TOKimport) | 8663 if (e2->op == TOKtype || e2->op == TOKimport) |
8664 error("%s is not an expression", e2->toChars()); | 8664 error("%s is not an expression", e2->toChars()); |
8665 return this; | 8665 return this; |
8666 } | 8666 } |