Bug 5929 – Casting to void, Internal error: ..\ztc\cod1.c 3136
Status
RESOLVED
Resolution
DUPLICATE
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-05-05T08:53:00Z
Last change time
2011-05-05T11:45:10Z
Assigned to
nobody
Creator
pszturmaj
Comments
Comment #0 by pszturmaj — 2011-05-05T08:53:25Z
module main;
void test(void[] a)
{
}
void main(string[] argv)
{
long num;
test(cast(void[])[num]); // ok
test([cast(void)num]); // Internal error: ..\ztc\cod1.c 3136
}
I think the last construct should be disallowed by the compiler.
Comment #1 by kennytm — 2011-05-05T11:45:10Z
*** This issue has been marked as a duplicate of issue 4494 ***