What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
                 CC|                            |
         Resolution|FIXED                       |

--- Comment #42 from 2012-08-17 14:05:39 PDT ---
The following code (two modules) shows that this bug is not fixed yet.

module foo;                                                                     

void baz(alias pred)()                                                          


module bar;                                                                     

import foo;                                                                     

void bar(int id)                                                                
        id = 0; // passing a delegate as template argument does not allow       
                // accessing its environment                                    

dmd foo.d bar.d
results in:
bar.d(5): Error: function compiler error, parameter 'id', bugzilla
dmd: glue.c:717: virtual void FuncDeclaration::toObjFile(int): Assertion `0'

Unfortunately I couldn't reduce the test case any further. If the delegate has
no parameter I cannot reproduce the compiler assertion failure. And of course
if id is not accessed from within the delegate the problem goes away. This is
at the core of the problem.
As pointed out in the comments the specified order of files is important. I.e. 
dmd bar.d foo.d compiles just fine.

I used DMD64 D Compiler v2.060.
I'm reopening this bug.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to