mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed foreach ref iteration with sized arrays
This commit is contained in:
parent
3c8bb9bed9
commit
b1432782a8
1 changed files with 2 additions and 0 deletions
|
@ -6572,6 +6572,8 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
{
|
||||
target = MakeAddressable(target);
|
||||
arrayItem = BfTypedValue(CreateIndexedValue(arrayType->mElementType, target.mValue, itrVal, true), arrayType->mElementType, true);
|
||||
if (isRefExpression)
|
||||
arrayItem = BfTypedValue(arrayItem.mValue, CreateRefType(arrayItem.mType));
|
||||
}
|
||||
arrayItem = Cast(forEachStmt->mCollectionExpression, arrayItem, varType, BfCastFlags_Explicit);
|
||||
if ((arrayItem) && (!arrayItem.mValue.IsFake()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue