[Issue 6190] New: ref bypasses array const
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 21 11:00:07 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6190
Summary: ref bypasses array const
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
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 2011-06-21 10:55:19 PDT ---
Maybe this bug is already fixed in the dmd 2.054alpha.
This runs with no errors on Windows and segfaults at runtime on Linux:
void foo(ref string txt) {
txt.length += 1;
}
void main() {
const s = "hello";
foo(s);
}
--
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