[Issue 2610] New: const/invariant(immutable) class don't have constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 23 23:03:42 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2610

           Summary: const/invariant(immutable) class don't have constructor
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: rayerd.wiz at gmail.com


>type a.d
immutable class A {
  string s;
  this() {// error
    s = "hoge";
  }
}
>dmd a
Error: cannot implicitly convert expression (this) of type immutable(A) to a.A


-- 



More information about the Digitalmars-d-bugs mailing list