1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +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 else
{ {
// Normal case // Normal case
if ((nextResult) && (varType->IsComposite())) if ((nextResult) && (varType->IsComposite()) && (!isRefExpression))
{ {
needsValCopy = false; needsValCopy = false;
varType = CreateRefType(varType); varType = CreateRefType(varType);