Fix reference to value cast
This commit is contained in:
parent
fccfe35c4f
commit
0a9c43757a
|
@ -5118,6 +5118,9 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
||||||
|
|
||||||
InterInstruction * ins = new InterInstruction(MapLocation(exp, inlineMapper), IC_CONVERSION_OPERATOR);
|
InterInstruction * ins = new InterInstruction(MapLocation(exp, inlineMapper), IC_CONVERSION_OPERATOR);
|
||||||
|
|
||||||
|
if (vr.mType->IsReference() && !exp->mDecType->IsReference())
|
||||||
|
vr = ToValue(proc, exp, block, inlineMapper, vr);
|
||||||
|
|
||||||
if (exp->mDecType->mType == DT_TYPE_FLOAT && vr.mType->IsIntegerType())
|
if (exp->mDecType->mType == DT_TYPE_FLOAT && vr.mType->IsIntegerType())
|
||||||
{
|
{
|
||||||
vr = Dereference(proc, exp, block, inlineMapper, vr);
|
vr = Dereference(proc, exp, block, inlineMapper, vr);
|
||||||
|
|
Loading…
Reference in New Issue