mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +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);
|
auto rhsArrayTypeRef = BfNodeDynCastExact<BfArrayTypeRef>(rhs);
|
||||||
if (rhsArrayTypeRef == NULL)
|
if (rhsArrayTypeRef == NULL)
|
||||||
return false;
|
return false;
|
||||||
if (!rhsArrayTypeRef->mParams.IsEmpty())
|
// Any non-comma param means it's a sized array
|
||||||
return false;
|
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;
|
BfArrayType* lhsArrayType = (BfArrayType*) lhs;
|
||||||
if (lhsArrayType->mDimensions != rhsArrayTypeRef->mDimensions)
|
if (lhsArrayType->mDimensions != rhsArrayTypeRef->mDimensions)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue