mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed comptime reflection issue with interface methods
This commit is contained in:
parent
b37dfcee62
commit
c0ae4bb8f7
1 changed files with 11 additions and 8 deletions
|
@ -6680,16 +6680,19 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
|
||||||
auto interfaceData = mBfIRBuilder->CreateConstAgg_Value(mBfIRBuilder->MapTypeInst(reflectInterfaceDataType->ToTypeInstance(), BfIRPopulateType_Full), interfaceDataVals);
|
auto interfaceData = mBfIRBuilder->CreateConstAgg_Value(mBfIRBuilder->MapTypeInst(reflectInterfaceDataType->ToTypeInstance(), BfIRPopulateType_Full), interfaceDataVals);
|
||||||
interfaces.push_back(interfaceData);
|
interfaces.push_back(interfaceData);
|
||||||
|
|
||||||
for (int methodIdx = 0; methodIdx < (int)interface.mInterfaceType->mMethodInstanceGroups.size(); methodIdx++)
|
if (!mIsComptimeModule)
|
||||||
{
|
{
|
||||||
auto ifaceMethodGroup = &interface.mInterfaceType->mMethodInstanceGroups[methodIdx];
|
for (int methodIdx = 0; methodIdx < (int)interface.mInterfaceType->mMethodInstanceGroups.size(); methodIdx++)
|
||||||
if (ifaceMethodGroup->mExplicitlyReflected)
|
|
||||||
{
|
{
|
||||||
wantsIfaceMethods = true;
|
auto ifaceMethodGroup = &interface.mInterfaceType->mMethodInstanceGroups[methodIdx];
|
||||||
int tableIdx = interface.mStartInterfaceTableIdx + methodIdx;
|
if (ifaceMethodGroup->mExplicitlyReflected)
|
||||||
while (tableIdx >= wantsIfaceMethod.size())
|
{
|
||||||
wantsIfaceMethod.Add(false);
|
wantsIfaceMethods = true;
|
||||||
wantsIfaceMethod[tableIdx] = true;
|
int tableIdx = interface.mStartInterfaceTableIdx + methodIdx;
|
||||||
|
while (tableIdx >= wantsIfaceMethod.size())
|
||||||
|
wantsIfaceMethod.Add(false);
|
||||||
|
wantsIfaceMethod[tableIdx] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue