mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed generated method calling in comptime
This commit is contained in:
parent
822b899a7d
commit
29755fddcf
1 changed files with 12 additions and 0 deletions
|
@ -8516,6 +8516,18 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
|
|||
if ((callEntry.mFunctionInfo->mCeFunction == NULL) && (!callEntry.mFunctionInfo->mMethodRef.IsNull()))
|
||||
{
|
||||
auto methodRef = callEntry.mFunctionInfo->mMethodRef;
|
||||
if (methodRef.mMethodNum >= methodRef.mTypeInstance->mTypeDef->mMethods.mSize)
|
||||
{
|
||||
// Must be a comptime-generated method
|
||||
ceModule->PopulateType(methodRef.mTypeInstance);
|
||||
}
|
||||
|
||||
if (methodRef.mMethodNum >= methodRef.mTypeInstance->mTypeDef->mMethods.mSize)
|
||||
{
|
||||
_Fail("OOB method reference");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto methodDef = methodRef.mTypeInstance->mTypeDef->mMethods[methodRef.mMethodNum];
|
||||
auto moduleMethodInstance = ceModule->GetMethodInstance(methodRef.mTypeInstance, methodDef,
|
||||
methodRef.mMethodGenericArguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue