mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 23:33:13 +01:00
Fix for delegates.
The following code works correctly now: auto dg = &super.virtualFunc();
This commit is contained in:
@@ -2105,7 +2105,8 @@ DValue* DelegateExp::toElem(IRState* p)
|
||||
Logger::println("func: '%s'", func->toPrettyChars());
|
||||
|
||||
LLValue* castfptr;
|
||||
if (func->isVirtual() && !func->isFinal())
|
||||
|
||||
if (e1->op != TOKsuper && func->isVirtual() && !func->isFinal())
|
||||
castfptr = DtoVirtualFunctionPointer(u, func, toChars());
|
||||
else if (func->isAbstract())
|
||||
assert(0 && "TODO delegate to abstract method");
|
||||
|
||||
Reference in New Issue
Block a user