[Issue 1824] Object not const correct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 25 00:15:56 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1824
caron800 at googlemail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Version|2.010 |2.013
------- Comment #1 from caron800 at googlemail.com 2008-04-25 02:15 -------
Raising the priority of this to critical because it hasn't been fixed yet.
The following will not compile:
import std.stdio;
class A {}
const A a = new A;
const A b = new A;
void main()
{
if (a == b) writefln("equal");
}
The error is
Error: a.opEquals can only be called on a mutable object, not const(A)
--
More information about the Digitalmars-d-bugs
mailing list