mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 09:38:01 +02:00
Allow extending Object and ValueType
This commit is contained in:
parent
0826b6d49f
commit
54dc59e049
6 changed files with 126 additions and 22 deletions
|
@ -6580,7 +6580,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto lengthValAddr = mBfIRBuilder->CreateInBoundsGEP(arrayBaseValue, 0, 1);
|
||||
auto lengthValAddr = mBfIRBuilder->CreateInBoundsGEP(arrayBaseValue, 0, GetFieldDataIdx(arrayType->mBaseType, 0, "mLength"));
|
||||
lengthVal = mBfIRBuilder->CreateLoad(lengthValAddr);
|
||||
}
|
||||
lengthVal = mBfIRBuilder->CreateNumericCast(lengthVal, true, BfTypeCode_IntPtr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue