[Issue 6577] New: 'Cannot initialize member' error line number
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 30 03:08:21 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6577
Summary: 'Cannot initialize member' error line number
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-08-30 03:08:19 PDT ---
struct Foo {
int x;
this(int x_) { this.x = x_; }
}
void main() {
const Foo* f = new Foo(1);
f.x++;
}
DMD 2.055head gives no line number:
Error: can only initialize const member x inside constructor
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list