mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Better error for comptime initializer expressions
This commit is contained in:
parent
9bb34ce029
commit
0ee161c314
1 changed files with 6 additions and 0 deletions
|
@ -10148,6 +10148,12 @@ void BfExprEvaluator::Visit(BfInitializerExpression* initExpr)
|
|||
|
||||
for (auto elementExpr : initExpr->mValues)
|
||||
{
|
||||
if ((mBfEvalExprFlags & BfEvalExprFlags_Comptime) != 0)
|
||||
{
|
||||
mModule->Fail("Comptime cannot evaluate initializer expressions", elementExpr);
|
||||
break;
|
||||
}
|
||||
|
||||
bool wasValidInitKind = false;
|
||||
|
||||
if (auto assignExpr = BfNodeDynCast<BfAssignmentExpression>(elementExpr))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue