1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixes for default interface properties and bindings

This commit is contained in:
Brian Fiete 2020-11-19 09:37:43 -08:00
parent 4e5baf3b84
commit 4cae7ff373
3 changed files with 146 additions and 96 deletions

View file

@ -9728,6 +9728,15 @@ BfModuleMethodInstance BfModule::GetMethodInstanceAtIdx(BfTypeInstance* typeInst
auto methodInstance = typeInstance->mMethodInstanceGroups[methodIdx].mDefault;
BfMethodDef* methodDef = NULL;
BfTypeInstance* foreignType = NULL;
if (methodInstance != NULL)
{
methodDef = methodInstance->mMethodDef;
if (methodInstance->mMethodInfoEx != NULL)
foreignType = methodInstance->mMethodInfoEx->mForeignType;
}
if ((methodInstance != NULL) && (mIsReified) && (!methodInstance->mIsReified))
{
// Can't use it, not reified
@ -9740,7 +9749,9 @@ BfModuleMethodInstance BfModule::GetMethodInstanceAtIdx(BfTypeInstance* typeInst
BfIRFunction func(mBfIRBuilder->GetFakeVal());
return BfModuleMethodInstance(methodInstance, func);
}
if (foreignType != NULL)
return GetMethodInstance(typeInstance, methodDef, BfTypeVector(), (BfGetMethodInstanceFlags)(flags | BfGetMethodInstanceFlag_ForeignMethodDef), foreignType);
return GetMethodInstance(typeInstance, typeInstance->mTypeDef->mMethods[methodIdx], BfTypeVector(), flags);
}