patterns: Fixed ternaries not being proper numeric expressions

This commit is contained in:
WerWolv 2021-03-16 21:29:14 +01:00
parent f34b946ea9
commit b7dd936dae
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ namespace hex::lang {
throwParseError("expected ':' in ternary expression");
auto third = this->parseBooleanOr();
node = new ASTNodeTernaryExpression(node, second, third, Token::Operator::TernaryConditional);
node = TO_NUMERIC_EXPRESSION(new ASTNodeTernaryExpression(node, second, third, Token::Operator::TernaryConditional));
}
nodeCleanup.release();