www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14075] New: [REG2.067a] ICE with ambiguous overloading


          Issue ID: 14075
           Summary: [REG2.067a] ICE with ambiguous overloading functions
                    without body
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: sinkuupump gmail.com

A regression introduced in

struct Foo
    auto opAssign(this X)(ref typeof(this));
    auto opAssign(this X, V)(ref V) if (!is(V == typeof(this)));

void test()
    Foo src;
    const(Foo) target;
    static if (is(typeof(target = src))) {}

Compiling this code causes the compiler to segfault.

0x0000000000429fe0 in OpOverload::visit (this=0x7fffffffcee0, e=0x7ffff7ec85a0)
    at opover.c:692
692                                m.lastf->toChars());

Jan 29 2015