mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed const error checking
This commit is contained in:
parent
af096ffad3
commit
01cb9bf970
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue