1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed false signature change with multiple extensions

This commit is contained in:
Brian Fiete 2020-12-31 09:56:51 -08:00
parent f81a1cf896
commit fa65029dfa
7 changed files with 155 additions and 8 deletions

View file

@ -628,13 +628,44 @@ public:
{
mGenericParamFlags = BfGenericParamFlag_None;
}
bool operator==(const BfConstraintDef& other) const
{
if (mGenericParamFlags != other.mGenericParamFlags)
return false;
if (mConstraints.mSize != other.mConstraints.mSize)
return false;
for (int i = 0; i < mConstraints.mSize; i++)
{
if (!mConstraints[i]->Equals(other.mConstraints[i]->ToStringView()))
return false;
}
return true;
}
bool operator!=(const BfConstraintDef& other) const
{
return !(*this == other);
}
};
class BfGenericParamDef : public BfConstraintDef
{
public:
String mName;
Array<BfIdentifierNode*> mNameNodes; // 0 is always the def name
Array<BfIdentifierNode*> mNameNodes; // 0 is always the def name
bool operator==(const BfGenericParamDef& other) const
{
if (mName != other.mName)
return false;
return *(BfConstraintDef*)this == *(BfConstraintDef*)&other;
}
bool operator!=(const BfGenericParamDef& other) const
{
return !(*this == other);
}
};
class BfExternalConstraintDef : public BfConstraintDef