www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17783] New: "invalid" leftmost column string in a delimited

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

          Issue ID: 17783
           Summary: "invalid" leftmost column string in a delimited string
                    does not compile
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nmtigor.wang googlemail.com

The following code does not compile:

 safe unittest
{
    string str1 = q"DLANG
q"123"
DLANG";
    assert( str1 == "q\"123\"\n" );
}

But the following compiles:

 safe unittest
{
    string str1 = q"DLANG
 q"123"
DLANG";
    assert( str1 == " q\"123\"\n" );
}

--
Aug 26