Skip to content

Commit

Permalink
Fix for issue #543.
Browse files Browse the repository at this point in the history
Immutables are constant values, too.
  • Loading branch information
redstar committed Nov 14, 2013
1 parent 29e646e commit 2063b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/llvmhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2063b4e

Please sign in to comment.