Browse Source

Fixed method selection reification

Brian Fiete 3 years ago
parent
commit
2384b7edfc
1 changed files with 3 additions and 6 deletions
  1. 3 6
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 3 - 6
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -9107,6 +9107,9 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
 			lookupTypeInst = NULL;
 	}
 
+	if ((mModule->mIsReified) && (targetTypeInst != NULL) && (!targetTypeInst->mIsReified) && (!targetTypeInst->mModule->mReifyQueued))
+		mModule->PopulateType(targetTypeInst);
+
 	BfMethodDef* methodDef = NULL;
 	BfTypeVector checkMethodGenericArguments;
 
@@ -15927,12 +15930,6 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
 {
 	bool failed = false;
 
-	if ((mModule->mIsReified) && (!curTypeInst->mIsReified))	
-	{
-		// Make sure target type gets reified
-		mModule->PopulateType(curTypeInst);
-	}
-
 	BfTypeVector resolvedGenericArguments;
 	BfMethodState* rootMethodState = NULL;
 	if (mModule->mCurMethodState != NULL)