Thread overview
[Issue 789] New: const initialization in forwarding constructors doesn't work
Jan 03, 2007
d-bugmail
Apr 21, 2007
d-bugmail
Apr 25, 2007
d-bugmail
January 03, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=789

           Summary: const initialization in forwarding constructors doesn't
                    work
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid, spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: thecybershadow@gmail.com


Spec: http://www.digitalmars.com/d/attribute.html#const

Program:

class C
{
    const int a;

    this()
    {
        a = 3;                 // ok
    }

    this(int x)
    {
        this();                // ok, forwarding constructor
    }
}

Compiler output:

C:\...\bugs>dmd const.d
const.d(10): constructor const.C.this missing initializer for const field a


-- 

April 21, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=789


deewiant@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deewiant@gmail.com




------- Comment #2 from deewiant@gmail.com  2007-04-21 11:20 -------
*** Bug 512 has been marked as a duplicate of this bug. ***


-- 

April 25, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=789





------- Comment #3 from thomas-dloop@kuehne.cn  2007-04-25 12:57 -------
Added to DStress as http://dstress.kuehne.cn/run/c/const_47_A.d http://dstress.kuehne.cn/run/c/const_47_B.d


--