瀏覽代碼

Fixed const error checking

Brian Fiete 3 月之前
父節點
當前提交
01cb9bf970
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      IDEHelper/Compiler/BfConstResolver.cpp

+ 1 - 1
IDEHelper/Compiler/BfConstResolver.cpp

@@ -425,7 +425,7 @@ bool BfConstResolver::PrepareMethodArguments(BfAstNode* targetSrc, BfMethodMatch
 			if ((mModule->mCurMethodInstance == NULL) || (mModule->mCurMethodInstance->mMethodDef->mMethodType != BfMethodType_Mixin))
 			if ((mModule->mCurMethodInstance == NULL) || (mModule->mCurMethodInstance->mMethodDef->mMethodType != BfMethodType_Mixin))
 				requiresConst = true;
 				requiresConst = true;
 
 
-			if ((requiresConst) && (argValue.mValue.IsFake()) && (!argValue.mType->IsValuelessType()))
+			if ((requiresConst) && (!mModule->mBfIRBuilder->IsConstValue(argValue.mValue)) && (!argValue.mType->IsValuelessType()))
 			{
 			{
 				mModule->Fail("Expression does not evaluate to a constant value", argExpr);
 				mModule->Fail("Expression does not evaluate to a constant value", argExpr);
 			}
 			}