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

Improved extension virtual override

This commit is contained in:
Brian Fiete 2022-06-28 09:34:46 -07:00
parent 96de5c9994
commit c8d2d4852e
3 changed files with 4 additions and 2 deletions

View file

@ -24431,6 +24431,8 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
}
else if (checkMethod->GetMethodDeclaration() == NULL)
silentlyAllow = true;
else if (methodDef->mIsOverride)
silentlyAllow = true;
else
extensionWarn = true;
}

View file

@ -204,7 +204,7 @@ namespace Tests
return mTVal;
}
public int GetB()
public new int GetB()
{
return 2;
}

View file

@ -201,7 +201,7 @@ namespace Tests
extension MethodRefHolder<T> where T : Delegate
{
public void Dispose()
public new void Dispose()
{
delete mVal;
}