diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 78cba750a7..adee6112c7 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1063,7 +1063,7 @@ void DtoResolveVariable(VarDeclaration* vd) Logger::println("parent: null"); } - const bool isLLConst = vd->isConst() && vd->init; + const bool isLLConst = (vd->isConst() || vd->isImmutable()) && vd->init; assert(!vd->ir.initialized); vd->ir.initialized = gIR->dmodule;