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

Support for non-static ++ and -- operator overloads

This commit is contained in:
Brian Fiete 2020-08-31 16:11:20 -07:00
parent 5924d4819b
commit 66d5f67528
3 changed files with 58 additions and 19 deletions

View file

@ -521,10 +521,13 @@ BfMethodDef* BfDefBuilder::CreateMethodDef(BfMethodDeclaration* methodDeclaratio
{
if (!methodDef->mIsStatic)
{
if (!declError.empty())
declError += " and ";
declError += "'static'";
methodDef->mIsStatic = true; // Fix it
if ((operatorDecl->mUnaryOp != BfUnaryOp_Increment) && (operatorDecl->mUnaryOp != BfUnaryOp_Decrement))
{
if (!declError.empty())
declError += " and ";
declError += "'static'";
methodDef->mIsStatic = true; // Fix it
}
}
}
if (!declError.empty())