https://issues.dlang.org/show_bug.cgi?id=18538

          Issue ID: 18538
           Summary: ubyte[] can append to string
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Repro:

    string s;
    ubyte[] ub;
    s ~= ub;

Expected:

    For that to not work.

Actual:

    It work.

Notes:

    https://dlang.org/spec/type.html
    ubyte: 8 bits
    char: UTF-8 code unit

    Many 8-bit numbers are not valid UTF-8 code points.

--

Reply via email to