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: bugzi...@digitalmars.com
        ReportedBy: rayerd....@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


-- 

Reply via email to