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

Fixed interface error with private property accessors

This commit is contained in:
Brian Fiete 2020-10-30 13:20:54 -07:00
parent e2bc29cf9c
commit 587f91fcce

View file

@ -22416,7 +22416,13 @@ bool BfModule::SlotInterfaceMethod(BfMethodInstance* methodInstance)
if ((methodDef->mBody == NULL) && (methodDef->mProtection == BfProtection_Private))
{
Fail("Private interface methods must provide a body", methodDef->GetMethodDeclaration()->mProtectionSpecifier);
auto methodDeclaration = methodDef->GetMethodDeclaration();
BfAstNode* refNode = NULL;
if (auto propertyDeclaration = methodDef->GetPropertyDeclaration())
refNode = propertyDeclaration->mProtectionSpecifier;
else if (methodDeclaration != NULL)
refNode = methodDeclaration->mProtectionSpecifier;
Fail("Private interface methods must provide a body", refNode);
}
if ((methodInstance->mMethodInfoEx != NULL) && (methodInstance->mMethodInfoEx->mExplicitInterface != NULL) && (!methodDef->mIsOverride))