www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2610] New: const/invariant(immutable) class don't have constructor

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: rayerd.wiz 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 --
Jan 23 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2610


Haruki Shigemori <rayerd.wiz gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2610


nfxjfg gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg gmail.com



You closed this bug as fixed, but what was the resolution?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2610


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc



This code compiles and runs fine on dmd v.2.046.

immutable class A {
  string s;
  this() {
    s = "hoge";
  }
}
void main() {
  A a = new A;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2610




PDT ---

 You closed this bug as fixed, but what was the resolution?
Sorry. I should have written a reason.
 This code compiles and runs fine on dmd v.2.046.
 
 immutable class A {
   string s;
   this() {
     s = "hoge";
   }
 }
 void main() {
   A a = new A;
 }
Thanks! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 18 2010