mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Improvements to failed extension, fixed protection on extended types
This commit is contained in:
parent
0a856c91ff
commit
c91c81f77d
2 changed files with 15 additions and 8 deletions
|
@ -2597,6 +2597,11 @@ bool BfSystem::FindTypeDef(const BfAtomComposite& findName, int numGenericArgs,
|
|||
// Still allow SOME match even if we put in the wrong number of generic args
|
||||
curPri -= 4;
|
||||
}
|
||||
if ((typeDef->mPartials.mSize > 0) && (typeDef->mPartials[0]->IsExtension()))
|
||||
{
|
||||
// Is a failed extension
|
||||
curPri -= 8;
|
||||
}
|
||||
|
||||
if ((curPri > ctx->mBestPri) || (ctx->mBestTypeDef == NULL))
|
||||
{
|
||||
|
@ -3059,8 +3064,7 @@ void BfSystem::AddToCompositePartial(BfPassInstance* passInstance, BfTypeDef* co
|
|||
typeDef->mHasCEOnCompile |= partialTypeDef->mHasCEOnCompile;
|
||||
typeDef->mHasExtensionMethods |= partialTypeDef->mHasExtensionMethods;
|
||||
typeDef->mHasUsingFields |= partialTypeDef->mHasUsingFields;
|
||||
typeDef->mHasOverrideMethods |= partialTypeDef->mHasOverrideMethods;
|
||||
typeDef->mProtection = BF_MIN(typeDef->mProtection, partialTypeDef->mProtection);
|
||||
typeDef->mHasOverrideMethods |= partialTypeDef->mHasOverrideMethods;
|
||||
|
||||
for (auto innerType : partialTypeDef->mNestedTypes)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue