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

Fixed autoCtor parsing issue when followed by type generic constraint

This commit is contained in:
Brian Fiete 2023-12-24 07:05:27 -05:00
parent 0734c9ffbb
commit 9d72043a71

View file

@ -9887,6 +9887,10 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
MoveNode(methodDeclaration->mCloseParen, methodDeclaration);
mVisitorPos.MoveNext();
auto ctorDecl = BfNodeDynCast<BfConstructorDeclaration>(methodDeclaration);
if (auto autoCtorDecl = BfNodeDynCast<BfAutoConstructorDeclaration>(ctorDecl))
return true;
auto typeDecl = mCurTypeDecl;
nextNode = mVisitorPos.GetNext();
if ((tokenNode = BfNodeDynCast<BfTokenNode>(nextNode)))
@ -9914,8 +9918,6 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
}
}
auto ctorDecl = BfNodeDynCast<BfConstructorDeclaration>(methodDeclaration);
nextNode = mVisitorPos.GetNext();
auto endToken = BfNodeDynCast<BfTokenNode>(nextNode);
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Colon))
@ -9974,9 +9976,6 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
endToken = NULL;
}
if (auto autoCtorDecl = BfNodeDynCast<BfAutoConstructorDeclaration>(ctorDecl))
return true;
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Semicolon))
{
MEMBER_SET_CHECKED_BOOL(methodDeclaration, mEndSemicolon, endToken);