March 13, 2005 bug, pointers and boolean expressions | ||||
---|---|---|---|---|
| ||||
code (equalR returns bool) ----- bool equal(X* a, X* b) { return (!a || !b) ? !a && !b : equalR(a,b); } ----- DMD 0.116 WIN32: cannot implicitly convert expression (!a || !b ? !a && !b : cast(int)(equalR(a,b))) of type int to bit |
March 14, 2005 Re: bug, pointers and boolean expressions | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tintor Marko Attachments: | Tintor Marko wrote: | code (equalR returns bool) | ----- | bool equal(X* a, X* b) | { | return (!a || !b) ? !a && !b : equalR(a,b); | } | ----- | | DMD 0.116 WIN32: cannot implicitly convert expression (!a || !b ? !a | && !b : cast(int)(equalR(a,b))) of type int to bit Added to DStress as http://dstress.kuehne.cn/run/cast_20.d http://dstress.kuehne.cn/run/cast_21.d Thomas |
Copyright © 1999-2021 by the D Language Foundation