when compiling win32 sources from http://www.dsource.org/projects/bindings/wiki/WindowsApi
I get this assert.
For example
\dev\dmd\bin\dmd.exe commctrl.d -c -I.. -version=Unicode -version=WindowsVista
Assertion failure: 't->deco' on line 597 in file 'mtype.c'
Comment #1 by bugzilla — 2008-04-22T20:52:40Z
Can you please cut it down to a small test case? Thanks!
Comment #2 by dfj1esp02 — 2008-04-23T02:10:35Z
I know that there should be a small test case.
I hoped that debug version of dmd will clear the situation quickly.
Didn't it help?
If you really need a test case, I'll make it... one day...
Comment #3 by dfj1esp02 — 2008-04-25T12:58:59Z
Created attachment 252
testcase
Is it small enough?
Comment #4 by dfj1esp02 — 2008-04-25T13:10:19Z
Whoa, I've found it.
extern(Windows):
void fun(PRPC_RUNDOWN);
alias void function() PRPC_RUNDOWN;
Comment #5 by braddr — 2008-04-27T19:18:42Z
*** Bug 2047 has been marked as a duplicate of this bug. ***
Comment #6 by htvennik — 2009-01-12T03:54:25Z
I ran into this bug too. When investigating it I found that it happens if an alias for a function pointer type is forward referenced, except when the type is "void function()". Surprisingly, changing the type into a delegate type will make it compile.
The minimal test-case seems to be:
Fn f;
alias int function() Fn;
Btw: For DMD 2.023 the assert is at mtype.c:1103.
Comment #7 by clugdbug — 2009-04-01T06:08:35Z
*** Bug 2433 has been marked as a duplicate of this bug. ***
Comment #8 by dfj1esp02 — 2009-04-06T06:12:28Z
Possibly related to bug 339
Comment #9 by clugdbug — 2009-04-21T09:00:52Z
*** Bug 2403 has been marked as a duplicate of this bug. ***
Comment #10 by clugdbug — 2009-05-04T08:05:17Z
*** Bug 2589 has been marked as a duplicate of this bug. ***