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

"Cannot bind to const-eval method, as this method is not available at runtime"

This commit is contained in:
Brian Fiete 2024-09-25 11:32:49 -04:00
parent 861913d591
commit 3a668695ef

View file

@ -13462,6 +13462,11 @@ void BfExprEvaluator::Visit(BfDelegateBindExpression* delegateBindExpr)
return;
}
if (((bindResult.mMethodInstance->mComptimeFlags & BfComptimeFlag_Comptime) != 0) && ((mModule->mCurMethodInstance->mComptimeFlags & BfComptimeFlag_Comptime) == 0))
{
mModule->Fail(StrFormat("Cannot bind to const-eval method '%s', as this method is not available at runtime", mModule->MethodToString(bindResult.mMethodInstance).c_str()), delegateBindExpr->mTarget);
}
auto bindMethodInstance = bindResult.mMethodInstance;
if (isMethodRefMatch)
{