mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
Fixed method override in generic extensions
This commit is contained in:
parent
390275b7f3
commit
f2b177693d
2 changed files with 13 additions and 1 deletions
|
@ -24355,7 +24355,7 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
||||||
auto checkMethodInstance = typeInstance->mMethodInstanceGroups[checkMethod->mIdx].mDefault;
|
auto checkMethodInstance = typeInstance->mMethodInstanceGroups[checkMethod->mIdx].mDefault;
|
||||||
if (checkMethodInstance == NULL)
|
if (checkMethodInstance == NULL)
|
||||||
{
|
{
|
||||||
if ((methodDef->mIsNew) && (methodDef->mDeclaringType->IsExtension()) && (!checkMethod->mDeclaringType->IsExtension()))
|
if ((methodDef->mDeclaringType->IsExtension()) && (!checkMethod->mDeclaringType->IsExtension()))
|
||||||
checkMethodInstance = GetRawMethodInstanceAtIdx(typeInstance, checkMethod->mIdx);
|
checkMethodInstance = GetRawMethodInstanceAtIdx(typeInstance, checkMethod->mIdx);
|
||||||
if (checkMethodInstance == NULL)
|
if (checkMethodInstance == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -267,6 +267,18 @@ namespace Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct TestExtern<T>
|
||||||
|
{
|
||||||
|
public extern void MethodA();
|
||||||
|
}
|
||||||
|
|
||||||
|
extension TestExtern<T> where T : Char8
|
||||||
|
{
|
||||||
|
public override void MethodA()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public static void TestBasics()
|
public static void TestBasics()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue