Mercurial > projects > ldc
changeset 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 | 4adf0f742896 |
children | 2cf440d511bb |
files | dmd/expression.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/expression.c Sat Nov 22 18:35:52 2008 +0100 +++ b/dmd/expression.c Sat Nov 22 18:38:13 2008 +0100 @@ -8593,7 +8593,7 @@ e2 = e2->checkToPointer(); type = Type::tboolean; - if (e1->type->ty == Tvoid) + if (e2->type->ty == Tvoid) type = Type::tvoid; if (e2->op == TOKtype || e2->op == TOKimport) error("%s is not an expression", e2->toChars()); @@ -8658,7 +8658,7 @@ e2 = e2->checkToPointer(); type = Type::tboolean; - if (e1->type->ty == Tvoid) + if (e2->type->ty == Tvoid) type = Type::tvoid; if (e2->op == TOKtype || e2->op == TOKimport) error("%s is not an expression", e2->toChars());