mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed sized array size inference, primitive type handling in ir
This commit is contained in:
parent
8894430f98
commit
a20519ee04
8 changed files with 92 additions and 21 deletions
|
@ -66,6 +66,11 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
if (memberRefExpr->mTarget == NULL)
|
||||
arraySize = (int)invocationExpr->mArguments.size();
|
||||
}
|
||||
else if (auto indexerExpr = BfNodeDynCast<BfIndexerExpression>(invocationExpr->mTarget))
|
||||
{
|
||||
// Sized array initializer
|
||||
arraySize = (int)invocationExpr->mArguments.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +80,7 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
return mResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
mResult = BfTypedValue(mModule->mBfIRBuilder->GetUndefConstValue(mModule->mBfIRBuilder->GetPrimitiveType(BfTypeCode_IntPtr)), mModule->GetPrimitiveType(BfTypeCode_IntPtr));
|
||||
return mResult;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue