Mercurial > projects > ddmd
comparison dmd/IntegerExp.d @ 137:09c858522d55
merge
author | Trass3r |
---|---|
date | Mon, 13 Sep 2010 23:29:00 +0200 |
parents | af1bebfd96a4 |
children | 438eaa11eed4 |
comparison
equal
deleted
inserted
replaced
136:9d194c848e3a | 137:09c858522d55 |
---|---|
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) { |