digitalmars.D.bugs - [Issue 1885] New: Syntax error for object identity test between invariant/mutable references
- d-bugmail puremagic.com (34/34) Mar 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1885
- d-bugmail puremagic.com (9/9) Mar 06 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1885
http://d.puremagic.com/issues/show_bug.cgi?id=1885 Summary: Syntax error for object identity test between invariant/mutable references Product: D Version: 2.011 Platform: PC OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: ludwig informatik.uni-luebeck.de Checking for object identity using 'a is b' causes a syntax error, if one of a and b is of type invariant(C) and the other one is typed C - although this should be allowed. ----------------- class C {} struct S {} int main(){ invariant(S)* si; S* sm; // Works: bool a = si is sm; invariant(C) ci; const(C) cm; // Error: incompatible types for ((ci) is (cm)): 'invariant(C)' and 'bug_is.C' bool b = ci is cm; return 0; } ----------------- --
Mar 02 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1885 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 2.012 --
Mar 06 2008