mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Added [?] implied size for sized arrays with initializers
This commit is contained in:
parent
82d2963a9e
commit
08e38a03f9
10 changed files with 250 additions and 162 deletions
|
@ -2654,7 +2654,7 @@ int BfResolvedTypeSet::Hash(BfTypeReference* typeRef, LookupContext* ctx, BfHash
|
|||
BfType* intType = ctx->mModule->GetPrimitiveType(BfTypeCode_IntPtr);
|
||||
constResolver.mAllowGenericConstValue = true;
|
||||
constResolver.mExpectingType = intType;
|
||||
BfTypedValue typedVal = constResolver.Resolve(sizeExpr);
|
||||
BfTypedValue typedVal = constResolver.Resolve(sizeExpr, NULL, BfConstResolveFlag_ArrayInitSize);
|
||||
if (typedVal.mKind == BfTypedValueKind_GenericConstValue)
|
||||
{
|
||||
int elemHash = Hash(typedVal.mType, ctx);
|
||||
|
@ -3550,7 +3550,7 @@ bool BfResolvedTypeSet::Equals(BfType* lhs, BfTypeReference* rhs, LookupContext*
|
|||
BfType* intType = ctx->mModule->GetPrimitiveType(BfTypeCode_IntPtr);
|
||||
constResolver.mAllowGenericConstValue = true;
|
||||
constResolver.mExpectingType = intType;
|
||||
BfTypedValue typedVal = constResolver.Resolve(sizeExpr);
|
||||
BfTypedValue typedVal = constResolver.Resolve(sizeExpr, NULL, BfConstResolveFlag_ArrayInitSize);
|
||||
if (typedVal.mKind == BfTypedValueKind_GenericConstValue)
|
||||
{
|
||||
if (!lhs->IsUnknownSizedArray())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue