Walter Bright <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Walter Bright <> 2012-04-20 
11:44:45 PDT ---
    // register function in struct (doesn't work, won't take alias for some
    HookupEngineFunction!( d.outputDebug )( pImports );

This is failing to compile because outputDebug is a non-static member function
of struct Debug. This means that a 'this' pointer is required. The parameter
'alias funcptr' to HookupEngineFunction requires an argument that is a symbolic
alias. But you're supplying a runtime value, d.outputDebug, that cannot be
evaluated at compile time.

In other words, d.outputDebug would be a delegate, and delegates can only be
constructed at runtime because they consist of a pair: a 'this' pointer and the
address of the function. The 'this' pointer cannot be determined at compile

If you make Debug.outputDebug a static member function, it will compile.

This is not a compiler bug.

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

Reply via email to