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

--- Comment #0 from James Miller <> 2012-04-19 03:45:23 PDT ---
Appending a regular `string` to a `dstring` does not cause a compile time

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;

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:
------- You are receiving this mail because: -------

Reply via email to