mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed autoCtor parsing issue when followed by type generic constraint
This commit is contained in:
parent
0734c9ffbb
commit
9d72043a71
1 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue