[Issue 11858] Comparison of unconnected classes using `is` must be disallowed
https://d.puremagic.com/issues/show_bug.cgi?id=11858 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added Severity|enhancement |major --- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com 2014-01-05 19:20:19 MSK --- (In reply to comment #2) This isn't accepts-invalid, because there's no rule against it. It's an enhancement request. It's still a bug as current dmd behaviour is inconsistent as if both types are qualified the compiler rejects such comparison. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 11858] Comparison of unconnected classes using `is` must be disallowed
https://d.puremagic.com/issues/show_bug.cgi?id=11858 Stewart Gordon s...@iname.com changed: What|Removed |Added Keywords||spec --- Comment #4 from Stewart Gordon s...@iname.com 2014-01-05 15:22:40 PST --- Hmm. There's a concept of a reinterpret cast with pointers, so an int* and a float* can feasibly be pointing to the same memory address. Since it's far less likely that this will be done with object references, I see now that it would need to be at least as strict to make sense. Looking at http://dlang.org/expression.html#IdentityExpression there isn't a clear statement of what combinations of types are allowed. There should be. As such, this is a spec issue as much as a compiler issue. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 11858] Comparison of unconnected classes using `is` must be disallowed
https://d.puremagic.com/issues/show_bug.cgi?id=11858 Stewart Gordon s...@iname.com changed: What|Removed |Added Keywords|accepts-invalid | CC||s...@iname.com Severity|major |enhancement --- Comment #2 from Stewart Gordon s...@iname.com 2014-01-03 05:53:13 PST --- This isn't accepts-invalid, because there's no rule against it. It's an enhancement request. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 11858] Comparison of unconnected classes using `is` must be disallowed
https://d.puremagic.com/issues/show_bug.cgi?id=11858 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2014-01-02 13:10:49 PST --- I think this would definitely catch some bugs. I wonder what kind of impact it would have on code breakage though (perhaps we would go through a warning phase first). There is definitely a precedent: - void main() { int* a; float* b; static assert(!__traits(compiles, a is b)); // ok, not allowed } - -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---