mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Support for internal property overrides in extensions
This commit is contained in:
parent
c4ff32826e
commit
71f5448f32
1 changed files with 16 additions and 2 deletions
|
@ -802,6 +802,20 @@ void BfModule::CheckMemberNames(BfTypeInstance* typeInst)
|
|||
std::swap(firstMemberRef, secondMemberRef);
|
||||
}
|
||||
|
||||
if (typeInst->mTypeDef->mIsCombinedPartial)
|
||||
{
|
||||
if ((firstMemberRef->mKindName == "property") && (secondMemberRef->mKindName == "property"))
|
||||
{
|
||||
auto firstPropertyDef = (BfPropertyDef*)firstMemberRef->mMemberDef;
|
||||
auto secondPropertyDef = (BfPropertyDef*)secondMemberRef->mMemberDef;
|
||||
if (auto secondPropertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(secondPropertyDef->mFieldDeclaration))
|
||||
{
|
||||
if ((secondPropertyDeclaration->mVirtualSpecifier != NULL) && (secondPropertyDeclaration->mVirtualSpecifier->mToken == BfToken_Override))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (secondMemberRef->mNameNode != NULL)
|
||||
error = Fail(StrFormat("A %s named '%s' has already been declared.", secondMemberRef->mKindName.c_str(), memberRef.mName.c_str()), secondMemberRef->mNameNode, true);
|
||||
showPrevious = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue