mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed compond assignment operator overloads
This commit is contained in:
parent
0c7597fe60
commit
ca64ea1f28
3 changed files with 66 additions and 14 deletions
|
@ -522,12 +522,22 @@ BfMethodDef* BfDefBuilder::CreateMethodDef(BfMethodDeclaration* methodDeclaratio
|
|||
declError = "'public'";
|
||||
methodDef->mProtection = BfProtection_Public; // Fix it
|
||||
}
|
||||
if (!methodDef->mIsStatic)
|
||||
if (operatorDecl->mAssignOp != BfAssignmentOp_None)
|
||||
{
|
||||
if (!declError.empty())
|
||||
declError += " and ";
|
||||
declError += "'static'";
|
||||
methodDef->mIsStatic = true; // Fix it
|
||||
if (methodDef->mIsStatic)
|
||||
{
|
||||
Fail("Assignment operator must not be declared 'static'", operatorDecl->mStaticSpecifier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!methodDef->mIsStatic)
|
||||
{
|
||||
if (!declError.empty())
|
||||
declError += " and ";
|
||||
declError += "'static'";
|
||||
methodDef->mIsStatic = true; // Fix it
|
||||
}
|
||||
}
|
||||
if (!declError.empty())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue