1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed invalid ref-to-non-ref implicit cast in foreach

This commit is contained in:
Brian Fiete 2022-08-03 08:53:52 -07:00
parent 2c439092c3
commit 5d14e714c2

View file

@ -6709,7 +6709,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
else
{
// Normal case
if ((nextResult) && (varType->IsComposite()))
if ((nextResult) && (varType->IsComposite()) && (!isRefExpression))
{
needsValCopy = false;
varType = CreateRefType(varType);