mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed type population with Span params
This commit is contained in:
parent
0df06b9870
commit
0c955e5c66
1 changed files with 5 additions and 1 deletions
|
@ -7481,9 +7481,11 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
|||
}
|
||||
else if (wantType->IsInstanceOf(mModule->mCompiler->mSpanTypeDef))
|
||||
{
|
||||
mModule->PopulateType(wantType);
|
||||
mModule->mBfIRBuilder->PopulateType(wantType);
|
||||
auto genericTypeInst = wantType->ToGenericTypeInstance();
|
||||
expandedParamsElementType = genericTypeInst->mGenericTypeInfo->mTypeGenericArguments[0];
|
||||
|
||||
|
||||
expandedParamsArray = BfTypedValue(mModule->CreateAlloca(wantType), wantType, true);
|
||||
expandedParamAlloca = mModule->CreateAlloca(genericTypeInst->mGenericTypeInfo->mTypeGenericArguments[0], true, NULL, mModule->GetConstValue(numElements));
|
||||
mModule->mBfIRBuilder->CreateAlignedStore(expandedParamAlloca, mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, 1), mModule->mSystem->mPtrSize);
|
||||
|
@ -7494,6 +7496,8 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
|
|||
}
|
||||
else if (wantType->IsSizedArray())
|
||||
{
|
||||
mModule->PopulateType(wantType);
|
||||
mModule->mBfIRBuilder->PopulateType(wantType);
|
||||
BfSizedArrayType* sizedArrayType = (BfSizedArrayType*)wantType;
|
||||
expandedParamsElementType = wantType->GetUnderlyingType();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue