mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +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))
|
else if (auto indexerExpr = BfNodeDynCast<BfIndexerExpression>(invocationExpr->mTarget))
|
||||||
{
|
{
|
||||||
// Sized array initializer
|
if (auto target = BfNodeDynCast<BfDotTypeReference>(indexerExpr->mTarget))
|
||||||
arraySize = (int)invocationExpr->mArguments.size();
|
{
|
||||||
|
// Inferred-type sized array initializer
|
||||||
|
arraySize = (int)invocationExpr->mArguments.size();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue