1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Merge pull request #2025 from Fusioon/function_type-error

Fix dangling error when typing delegate
This commit is contained in:
Brian Fiete 2024-09-09 10:35:07 -04:00 committed by GitHub
commit f386065444
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8911,10 +8911,15 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
methodDecl->mGenericConstraintsDeclaration = NULL;
}
if (methodDecl->mBody != NULL)
{
Fail("Unexpected method body after delegate/function type", methodDecl->mBody);
}
if (failed)
return typeDeclaration;
if (methodDecl->mEndSemicolon == NULL)
if ((methodDecl->mEndSemicolon == NULL) && (methodDecl->mCloseParen != NULL))
FailAfter("Expected ';'", methodDecl->mCloseParen);
//MEMBER_SET(methodDecl, mReturnType, retType);