mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed sized array size inference with typed initializer
This commit is contained in:
parent
0f33968030
commit
861c65820f
1 changed files with 5 additions and 2 deletions
|
@ -68,8 +68,11 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
}
|
||||
else if (auto indexerExpr = BfNodeDynCast<BfIndexerExpression>(invocationExpr->mTarget))
|
||||
{
|
||||
// Sized array initializer
|
||||
arraySize = (int)invocationExpr->mArguments.size();
|
||||
if (auto target = BfNodeDynCast<BfDotTypeReference>(indexerExpr->mTarget))
|
||||
{
|
||||
// Inferred-type sized array initializer
|
||||
arraySize = (int)invocationExpr->mArguments.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue