[Issue 11858] Comparison of unconnected classes using `is` must be disallowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 2 13:10:55 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11858


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at 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: -------


More information about the Digitalmars-d-bugs mailing list