diff --git a/gen/classes.cpp b/gen/classes.cpp index 2e0d0086..b331d3fd 100644 --- a/gen/classes.cpp +++ b/gen/classes.cpp @@ -547,7 +547,7 @@ static void init_class_vtbl_initializer(ClassDeclaration* cd) FuncDeclaration* fd = dsym->isFuncDeclaration(); assert(fd); - if (fd->isAbstract()) + if (fd->isAbstract() || (cd->isAbstract() && !fd->fbody)) { sinits[k] = getNullPtr(getVoidPtrType()); } diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index c3664772..7e1ece5d 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -972,7 +972,7 @@ void DtoConstInitGlobal(VarDeclaration* vd) // FIXME: I don't think it's thread safe ... bool doLazyInit = false; - Dsymbol* par = vd->toParent2(); + Dsymbol* par = vd->toParent(); if (par && par->isFuncDeclaration() && vd->init) {