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

Added concept of strict equality

This commit is contained in:
Brian Fiete 2020-06-17 05:13:53 -07:00
parent 308605a7dd
commit abeda6909b
13 changed files with 249 additions and 79 deletions

View file

@ -2061,6 +2061,19 @@ void BfDefBuilder::FinishTypeDef(bool wantsToString)
AddParam(methodDef, mSystem->mDirectSelfTypeRef, "rhs");
}
if (needsEqualsMethod)
{
auto methodDef = new BfMethodDef();
mCurTypeDef->mMethods.push_back(methodDef);
methodDef->mDeclaringType = mCurTypeDef;
methodDef->mName = BF_METHODNAME_DEFAULT_STRICT_EQUALS;
methodDef->mReturnTypeRef = mSystem->mDirectBoolTypeRef;
methodDef->mProtection = BfProtection_Private;
methodDef->mIsStatic = true;
AddParam(methodDef, mSystem->mDirectSelfTypeRef, "lhs");
AddParam(methodDef, mSystem->mDirectSelfTypeRef, "rhs");
}
HashContext inlineHashCtx;
if (mCurSource != NULL)