mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed autocomplete generic extension regression
This commit is contained in:
parent
35a81b7bbe
commit
4f978c5053
1 changed files with 4 additions and 2 deletions
|
@ -8889,9 +8889,11 @@ BfGenericParamInstance* BfModule::GetGenericTypeParamInstance(int genericParamId
|
|||
|
||||
if (genericTypeInst->mGenericTypeInfo->mGenericExtensionInfo != NULL)
|
||||
{
|
||||
bool isAutocomplete = (mCompiler->mResolvePassData != NULL) && (mCompiler->mResolvePassData->mAutoComplete != NULL);
|
||||
|
||||
auto activeTypeDef = GetActiveTypeDef(NULL, true);
|
||||
if ((activeTypeDef->mTypeDeclaration != genericTypeInst->mTypeDef->mTypeDeclaration) && (activeTypeDef->IsExtension()) &&
|
||||
(genericTypeInst->mTypeDef->ContainsPartial(activeTypeDef)))
|
||||
((genericTypeInst->mTypeDef->ContainsPartial(activeTypeDef)) || (isAutocomplete)))
|
||||
{
|
||||
BfTypeDef* lookupTypeDef = activeTypeDef;
|
||||
while (lookupTypeDef->mNestDepth > genericTypeInst->mTypeDef->mNestDepth)
|
||||
|
@ -8904,7 +8906,7 @@ BfGenericParamInstance* BfModule::GetGenericTypeParamInstance(int genericParamId
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((mCompiler->mResolvePassData == NULL) || (mCompiler->mResolvePassData->mAutoComplete == NULL))
|
||||
if (!isAutocomplete)
|
||||
{
|
||||
FatalError("Invalid GetGenericParamInstance with extension");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue