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

Fixed some module mutability issues

This commit is contained in:
Brian Fiete 2020-12-03 06:27:10 -08:00
parent adf46175cf
commit 230b71cecb
2 changed files with 15 additions and 4 deletions

View file

@ -4984,6 +4984,11 @@ void BfModule::AddMethodToWorkList(BfMethodInstance* methodInstance)
BF_ASSERT(defaultMethod != NULL);
if (methodInstance->mMethodInstanceGroup->mOnDemandKind == BfMethodOnDemandKind_Decl_AwaitingReference)
{
if ((defaultMethod->mIsReified) && (!defaultMethod->mDeclModule->mIsModuleMutable))
{
defaultMethod->mDeclModule->PrepareForIRWriting(methodInstance->GetOwner());
}
AddMethodToWorkList(defaultMethod);
}
}