[Issue 6227] New: Comparison of different enums
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 29 17:11:46 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6227
Summary: Comparison of different enums
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-06-29 17:06:51 PDT ---
I think comparisons of different enums may hide bugs (this compiles with no
errors on DMD 2.053):
enum Foo { x }
enum Bar { y }
void main() {
auto b = Foo.x == Bar.y;
}
A less visible to spot case:
enum { X }
enum { Y }
void main() {
auto b = X == Y;
}
See also bug 3999
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list