http://d.puremagic.com/issues/show_bug.cgi?id=7897
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzi...@digitalmars.com --- Comment #1 from Walter Bright <bugzi...@digitalmars.com> 2012-04-20 11:44:45 PDT --- ====== // register function in struct (doesn't work, won't take alias for some reason?) 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 time. If you make Debug.outputDebug a static member function, it will compile. This is not a compiler bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------