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

Fixed constraints on generic delegates

This commit is contained in:
Brian Fiete 2024-02-06 06:56:10 -05:00
parent b722614501
commit 6302416e40
2 changed files with 18 additions and 3 deletions

View file

@ -8866,7 +8866,16 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
}
}
if (!ParseMethod(methodDecl, &params, &commas))
bool failed = ParseMethod(methodDecl, &params, &commas);
if (methodDecl->mGenericConstraintsDeclaration != NULL)
{
typeDeclaration->mGenericConstraintsDeclaration = methodDecl->mGenericConstraintsDeclaration;
typeDeclaration->SetSrcEnd(methodDecl->GetSrcEnd());
methodDecl->mGenericConstraintsDeclaration = NULL;
}
if (failed)
return typeDeclaration;
if (methodDecl->mEndSemicolon == NULL)