diff --git a/gen/toir.cpp b/gen/toir.cpp index 228dfed6..c892aaef 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -2248,7 +2248,7 @@ DValue* DelegateExp::toElem(IRState* p) castfptr = DtoBitCast(castfptr, dgty->getContainedType(1)); - return new DImValue(type, DtoAggrPair(castcontext, castfptr, ".dg")); + return new DImValue(type, DtoAggrPair(DtoType(type), castcontext, castfptr, ".dg")); } //////////////////////////////////////////////////////////////////////////////////////////