Mercurial > projects > ddmd
comparison dmd/IntegerExp.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | e28b18c23469 |
children | 438eaa11eed4 |
comparison
equal
deleted
inserted
replaced
134:4251f96733f4 | 135:af1bebfd96a4 |
---|---|
207 return 1; | 207 return 1; |
208 } | 208 } |
209 | 209 |
210 override bool isBool(bool result) | 210 override bool isBool(bool result) |
211 { | 211 { |
212 return result ? value != 0 : value == 0; | 212 int r = toInteger() != 0; |
213 return cast(bool)(result ? r : !r); | |
213 } | 214 } |
214 | 215 |
215 override MATCH implicitConvTo(Type t) | 216 override MATCH implicitConvTo(Type t) |
216 { | 217 { |
217 static if (false) { | 218 static if (false) { |