digitalmars.D - Possible bug with ? : and const
- zildjohn01 (7/7) Mar 05 2009 I've boiled it down to this:
- Someone Else (3/4) Mar 06 2009 Please don't be so quick to shove me off the first page. At least drop i...
- Denis Koroskin (3/9) Mar 06 2009 Yes, I believe it is a bug and needs to be reported via bugzilla:
I've boiled it down to this: bool flag() { bool left, right; return true ? cast(const bool)left : cast(bool)right; } Error: cannot implicitly convert expression (cast(int)left) of type int to bool It seems like whenever the left and right sides differ in const-ness or invariant-ness, dmd tries to convert the left side to an int. Can anyone confirm or explain?
Mar 05 2009
zildjohn01 Wrote:some codePlease don't be so quick to shove me off the first page. At least drop it in dmd real quick and confirm this. Or tell me i'm dead wrong, that'd be cool too. Should I skip the forums and file the bug?
Mar 06 2009
On Fri, 06 Mar 2009 20:14:34 +0300, Someone Else <or possibly.not> wrote:zildjohn01 Wrote:Yes, I believe it is a bug and needs to be reported via bugzilla: http://d.puremagic.com/issues/some codePlease don't be so quick to shove me off the first page. At least drop it in dmd real quick and confirm this. Or tell me i'm dead wrong, that'd be cool too. Should I skip the forums and file the bug?
Mar 06 2009