From 2063b4ea89d7fb961459e8780092ce51397365ea Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Thu, 14 Nov 2013 21:21:04 +0100 Subject: [PATCH] Fix for issue #543. Immutables are constant values, too. --- gen/llvmhelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index f3f7f9ba..fd73e201 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1055,7 +1055,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;