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

Improved errors

This commit is contained in:
Brian Fiete 2020-07-13 09:55:16 -07:00
parent a69217e296
commit d3bfc731ef
4 changed files with 63 additions and 3 deletions

View file

@ -7065,7 +7065,9 @@ BfTypeDef* BfModule::FindTypeDef(const StringImpl& typeName, int numGenericArgs,
if (!mSystem->ParseAtomComposite(typeName, findName))
return NULL;
auto result = FindTypeDef(findName, numGenericArgs, typeInstanceOverride, error);
BF_ASSERT((result == NULL) || (result->mTypeCode != BfTypeCode_Extension));
// Don't allow just finding extensions here. This can happen in some 'using static' cases but generally shouldn't happen
if ((result != NULL) && (result->mTypeCode == BfTypeCode_Extension))
return NULL;
return result;
}