mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix dangling error when typing delegate, disallow method body after delegate type
This commit is contained in:
parent
b5ceaf9a4e
commit
921049ba02
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue