1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed static search issue with extensions

This commit is contained in:
Brian Fiete 2020-12-30 05:18:26 -08:00
parent a99a23f79a
commit d31dc16621

View file

@ -2204,6 +2204,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
BfStaticSearch* staticSearch; BfStaticSearch* staticSearch;
if (typeInstance->mStaticSearchMap.TryAdd(typeDef, NULL, &staticSearch)) if (typeInstance->mStaticSearchMap.TryAdd(typeDef, NULL, &staticSearch))
{ {
SetAndRestoreValue<BfTypeDef*> prevTypeDef(mContext->mCurTypeState->mCurTypeDef, typeDef);
for (auto typeRef : typeDef->mStaticSearch) for (auto typeRef : typeDef->mStaticSearch)
{ {
auto staticType = ResolveTypeRef(typeRef, NULL, BfPopulateType_Identity); auto staticType = ResolveTypeRef(typeRef, NULL, BfPopulateType_Identity);
@ -8470,7 +8471,7 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
{ {
mIgnoreErrors = prevIgnoreErrors.mPrevVal; mIgnoreErrors = prevIgnoreErrors.mPrevVal;
BfTypeReference* errorRefNode = qualifiedTypeRef->mLeft; BfTypeReference* errorRefNode = qualifiedTypeRef->mLeft;
if ((leftIsValid) && (mCurTypeInstance != NULL) && (mSystem->ContainsNamespace(leftComposite, mCurTypeInstance->mTypeDef->mProject))) if ((leftIsValid) && (mCurTypeInstance != NULL) && (mSystem->ContainsNamespace(leftComposite, curTypeDef->mProject)))
{ {
// The left was a namespace name, so throw an error on the whole string // The left was a namespace name, so throw an error on the whole string
errorRefNode = qualifiedTypeRef; errorRefNode = qualifiedTypeRef;