[Issue 14147] Compiler crash on identical functions in a single module

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 8 05:34:35 PST 2015


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

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
Reduced test case:

struct S(alias func) { void foo() { func(1); } }

void main()
{
}

pure auto mul(const int[] left, const int[] right)
{
    S!(a => a)().foo();
}

pure auto mul(const int[] left, const int[] right)
{
    S!(a => a)().foo();
}

In the two identical functions, the S!(a => a) will create different instances,
but their mangled names are wrongly identical. Then It makes the internal
compiler error (assertion failure).

--


More information about the Digitalmars-d-bugs mailing list