www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15744] New: (SIGABRT) Error: overloadset t.Bar.__ctor is

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

          Issue ID: 15744
           Summary: (SIGABRT) Error: overloadset t.Bar.__ctor is aliased
                    to a function
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: kozzi11 gmail.com

template AddField(T) {
    T b;
    this(Args...)(T b, auto ref Args args)
    {
       this.b = b;
       this(args);
    }
}

template construcotrs() {
    int a;
    this(int a) {
        this.a = a;
    }
}

struct Bar {

    mixin construcotrs;
    mixin AddField!(string);
}

unittest {
    auto bar1 = Bar(5);
    auto bar2 = Bar("bar", 15);  // line 31
}

--
Mar 02 2016