mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed array lookup
This commit is contained in:
parent
ca814fe695
commit
67dadf34e5
1 changed files with 10 additions and 2 deletions
|
@ -3139,8 +3139,16 @@ bool BfResolvedTypeSet::Equals(BfType* lhs, BfTypeReference* rhs, LookupContext*
|
|||
auto rhsArrayTypeRef = BfNodeDynCastExact<BfArrayTypeRef>(rhs);
|
||||
if (rhsArrayTypeRef == NULL)
|
||||
return false;
|
||||
if (!rhsArrayTypeRef->mParams.IsEmpty())
|
||||
return false;
|
||||
// Any non-comma param means it's a sized array
|
||||
for (auto param : rhsArrayTypeRef->mParams)
|
||||
{
|
||||
bool isComma = false;
|
||||
if (auto tokenNode = BfNodeDynCast<BfTokenNode>(param))
|
||||
isComma = tokenNode->mToken == BfToken_Comma;
|
||||
if (!isComma)
|
||||
return false;
|
||||
}
|
||||
|
||||
BfArrayType* lhsArrayType = (BfArrayType*) lhs;
|
||||
if (lhsArrayType->mDimensions != rhsArrayTypeRef->mDimensions)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue