Bug 14075 – [REG2.067a] Segfault with ambiguous overloading functions without body
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-29T13:29:00Z
Last change time
2015-02-02T00:58:11Z
Keywords
ice, pull
Assigned to
nobody
Creator
sinkuupump
Comments
Comment #0 by sinkuupump — 2015-01-29T13:29:54Z
A regression introduced in https://github.com/D-Programming-Language/dmd/pull/4309
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());