Skip to content

Commit d96b76b

Browse files
Ensure isUsed is set if MustProduceValue
1 parent a18431e commit d96b76b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Runtime/ByteCode/ByteCodeGenerator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,10 @@ ParseNode* VisitBlock(ParseNode *pnode, ByteCodeGenerator* byteCodeGenerator, Pr
12241224
}
12251225
}
12261226
}
1227+
if (nullptr != pnodeLastVal)
1228+
{
1229+
pnodeLastVal->isUsed = true;
1230+
}
12271231
return pnodeLastVal;
12281232
}
12291233

0 commit comments

Comments
 (0)