digitalmars.D.bugs - [Issue 7942] New: Appending a string to a dstring is allowed
- d-bugmail puremagic.com (34/34) Apr 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7942
http://d.puremagic.com/issues/show_bug.cgi?id=7942 Summary: Appending a string to a dstring is allowed Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: james aatch.net --- Comment #0 from James Miller <james aatch.net> 2012-04-19 03:45:23 PDT --- Appending a regular `string` to a `dstring` does not cause a compile time error. This case: string a = "abc"; dstring b = "abc"d; b ~= a; Causes a runtime error: array cast misalignment. This case: string a = "abcd"; dstring b = "abcd"d; b ~= a; writeln(b); causes a segmentation fault. Given that string a = "abcd"; dstring b = "abcd"d; a ~= b; causes a compile time error, and many other operations do not allow implicit string -> dstring casting, it should be picked up as a type error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 19 2012