mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Circular dependency checking between generic constraints
This commit is contained in:
parent
e307448363
commit
2bbe66cecc
7 changed files with 108 additions and 5 deletions
|
@ -14316,7 +14316,7 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
|
|||
{
|
||||
auto genericParamInstance = new BfGenericMethodParamInstance(methodDef, externConstraintIdx + (int)methodDef->mGenericParams.size());
|
||||
methodInstance->GetMethodInfoEx()->mGenericParams.push_back(genericParamInstance);
|
||||
}
|
||||
}
|
||||
|
||||
bool addToWorkList = !processNow;
|
||||
if (mCompiler->GetAutoComplete() != NULL)
|
||||
|
@ -22953,6 +22953,13 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
|
|||
for (auto typeRef : deferredResolveTypes)
|
||||
auto constraintType = ResolveTypeRef(typeRef, BfPopulateType_Declaration, BfResolveTypeRefFlag_None);
|
||||
|
||||
if (methodInstance->mMethodInfoEx != NULL)
|
||||
{
|
||||
ValidateGenericParams(BfGenericParamKind_Method,
|
||||
Span<BfGenericParamInstance*>((BfGenericParamInstance**)methodInstance->mMethodInfoEx->mGenericParams.mVals,
|
||||
methodInstance->mMethodInfoEx->mGenericParams.mSize));
|
||||
}
|
||||
|
||||
for (auto genericParam : methodInstance->mMethodInfoEx->mGenericParams)
|
||||
AddDependency(genericParam, mCurTypeInstance);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue