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

Fixed ref iteration over valueless types

This commit is contained in:
Brian Fiete 2020-07-22 15:32:27 -07:00
parent 1117aa9b8a
commit b1f741b1f0

View file

@ -6462,7 +6462,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
}
nextVal = Cast(forEachStmt->mCollectionExpression, nextVal, varType, BfCastFlags_Explicit);
nextVal = LoadValue(nextVal);
if (nextVal)
if ((nextVal) && (!nextVal.mType->IsValuelessType()))
mBfIRBuilder->CreateStore(nextVal.mValue, varInst);
}
}