www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18606] New: [REG2.072] "cannot append type const(T) to type

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

          Issue ID: 18606
           Summary: [REG2.072] "cannot append type const(T) to type T[]"
                    in .dup
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

///////// test.d /////////
struct S
{
    struct T
    {
        int foo;
        int[] bar;
    }

    struct M()
    {
        T[] arr;

        this(this)
        {
            arr = arr.dup;
        }
    }

    M!() m;
}
//////////////////////////

Introduced in https://github.com/dlang/dmd/pull/5500

--
Mar 13 2018