www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14682] New: [REG2.037] Incorrect interpretation of ~ []

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

          Issue ID: 14682
           Summary: [REG2.037] Incorrect interpretation of ~ []
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

////////// test.d //////////
import std.stdio;

void main()
{
    auto foo = ["foo"] ~ [];
    assert(foo.length == 1);
}
////////////////////////////

For some reason, DMD interprets `~[]` as `~[""]`.

--
Jun 10 2015