July 02, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 --- Comment #19 from Илья Ярошенко <ilyayaroshenko@gmail.com> --- This bugs causes critical data bugs for various libraries such as Algebraic/Variant types, JSON and other data libraries. Shame. -- |
August 25, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 Paul Backus <snarwin+bugzilla@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |deadalnix@gmail.com --- Comment #20 from Paul Backus <snarwin+bugzilla@gmail.com> --- *** Issue 22240 has been marked as a duplicate of this issue. *** -- |
August 25, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 deadalnix <deadalnix@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #21 from deadalnix <deadalnix@gmail.com> --- I'm reopening this. Sorry, but to put it bluntly, this behavior is completely retarded. There is no nicer way to put it. This is turning writing a piece of code I'm working on into a total nightmare as integers keeps being converted to bool in weird edge cases. -- |
August 25, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 --- Comment #22 from deadalnix <deadalnix@gmail.com> --- At the very least, 1 -> true should match as an implicit conversion, not an exact match (in which case, one gets an overload resolution error rather than a bug). That would still be bad, but that would at least not be the opposite one what anyone sensible expects. -- |
August 25, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 Paul Backus <snarwin+bugzilla@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snarwin+bugzilla@gmail.com --- Comment #23 from Paul Backus <snarwin+bugzilla@gmail.com> --- > At the very least, 1 -> true should match as an implicit conversion, not an exact match (in which case, one gets an overload resolution error rather than a bug). In this example, both `1 -> long` and `1 -> bool` are implicit conversions, so partial ordering is used, and `1 -> bool` is correctly selected as the more-specialized implicit conversion. The only thing one can really object to here is that the `1 -> bool` conversion is allowed in the first place. But since DIP 1015 has been rejected, it seems like that objection has been overruled, so there is (unfortunately) nothing left to be done here. -- |
August 26, 2021 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 Boris Carvajal <boris2.9@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |boris2.9@gmail.com -- |
December 17, 2022 [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=9999 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P4 -- |
Copyright © 1999-2021 by the D Language Foundation