[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 Walter Bright changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |INVALID --- Comment #7 from Walter Bright --- See detailed explanation in https://issues.dlang.org/show_bug.cgi?id=19399 This is not a bug, it is a misunderstanding of how match levels and partial ordering works. --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 --- Comment #6 from Dlang Bot --- @RazvanN7 created dlang/dmd pull request #10099 "Fix Issues 19399 and 10560 - Different Conversion Rules for Same Value and Type Enum" fixing this issue: - Fix Issues 19399 and 10560 - Different Conversion Rules for Same Value and Type Enum https://github.com/dlang/dmd/pull/10099 --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 RazvanN changed: What|Removed |Added Keywords||industry Status|RESOLVED|REOPENED CC||razvan.nitu1...@gmail.com Resolution|INVALID |--- --- Comment #5 from RazvanN --- Upon discussion with Andrei, an enumerated value is not a literal, hence it is subject to regular type checking and cannot be polysemous. See also https://issues.dlang.org/show_bug.cgi?id=19399 which is causing trouble in industrial application. --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 Sprink changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=19399 --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution|--- |INVALID --- Comment #4 from Walter Bright --- Rejected for same reason as https://issues.dlang.org/show_bug.cgi?id= --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 Mike Franklin changed: What|Removed |Added Keywords||pull CC||slavo5...@yahoo.com --- Comment #3 from Mike Franklin --- A DIP has been submitted to address this issue: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1015.md A PR implementing the DIP can be found at https://github.com/dlang/dmd/pull/7310 --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
https://issues.dlang.org/show_bug.cgi?id=10560 Mikechanged: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id= --
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
http://d.puremagic.com/issues/show_bug.cgi?id=10560 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #1 from Maxim Fomin ma...@maxim-fomin.ru 2013-07-07 00:21:26 PDT --- This is a separate issue. Boo should be Boo in the first place and int in the second. In referenced issue bool and long are overloaded, here are bool and int. If you pass 1 in such case int version should be called. Problem here is that int was converted to bool and passed to bool overload instead of int which is a bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload
http://d.puremagic.com/issues/show_bug.cgi?id=10560 --- Comment #2 from yazan.dab...@gmail.com 2013-07-07 13:44:11 PDT --- I certainly agree. I just wanted to note the explanation on why an int 'literal' of 1 would match a bool overload in the first place. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---