[Issue 13030] New: DMD assertion fails at mtype.c:697 if delegate has an argument name
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jul 3 02:43:13 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13030
Issue ID: 13030
Summary: DMD assertion fails at mtype.c:697 if delegate has an
argument name
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: liran at weka.io
The following code:
void va(Args...)(const Args args) {}
void func(int delegate(int n) a)
{
va(a);
}
causes an assertion in dmd:
dmd: mtype.c:697: void Type::fixTo(Type*): Assertion `mod != t->mod' failed.
If the name of the delegate argument is removed [no 'n'] it compiles.
If the called function has just a single template [void mva(T)(const T args)]
it compiles.
If the called functions receives non const args [void mva(A...)(A args)] it
also compiles.
This is the minimal set of lines that I was able to get to in order to recreate
the assertion error.
DMD64 D Compiler v2.065, fails on Linux and Mac OSX.(Did not try on other
platforms)
--
More information about the Digitalmars-d-bugs
mailing list