[Issue 8770] New: Wrong error line number with immutable field
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 6 14:00:00 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8770
Summary: Wrong error line number with immutable field
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-10-06 13:48:00 PDT ---
struct Foo {
immutable int bar = 1; // line 2
this(int x) {
this.bar = x;
}
}
void main() {}
Expected error:
temp.d(4): Error: this.bar is not mutable
But DMD 2.061alpha gives:
temp.d(2): Error: this.bar is not mutable
--
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