[Issue 789] New: const initialization in forwarding constructors doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 3 09:16:50 PST 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 at digitalmars.com
ReportedBy: thecybershadow at 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
--
More information about the Digitalmars-d-bugs
mailing list