Thread overview
[Issue 9974] New: immutable class constructor is broken
Apr 21, 2013
SHOO
Apr 21, 2013
Kenji Hara
Apr 21, 2013
Walter Bright
April 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9974

           Summary: immutable class constructor is broken
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: zan77137@nifty.com


--- Comment #0 from SHOO <zan77137@nifty.com> 2013-04-21 05:34:23 PDT ---
This code doesn't work(on git head master):
-----------
immutable class A { this(){} }
void main() { immutable a = new immutable A(); }
-----------

A result of git bisect is this commit: https://github.com/D-Programming-Language/dmd/commit/599ba0718771b25d255e14175cc8bd31d2a1842e

According to this commit, it is right behavior that following code become errors:
-----------
class A { this(){} }
void main() { immutable a = new immutable A(); }
-----------

On the other hand, following code is compiled correctly:
-----------
class A { this() immutable {} }
void main() {
    immutable a = new immutable A();
}
-----------

In *immutable class*, the result that is equal to the latter is expected.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9974


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-04-21 07:39:19 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1918

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9974



--- Comment #2 from github-bugzilla@puremagic.com 2013-04-21 12:29:07 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/883056cdc02854206f0288f3712331f927c95975 fix Issue 9974 - immutable class constructor is broken

https://github.com/D-Programming-Language/dmd/commit/f0469e57317f5791726d0c4e803e0085a05b9a2c Merge pull request #1918 from 9rnsr/fix9974

Issue 9974 - immutable class constructor is broken

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9974


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------