diff options
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index 215a004a..a01d2a53 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -872,17 +872,6 @@ static int expr_evaluate_relational(struct eval_ctx *ctx, struct expr **expr) return -1; right = rel->right; - if (!expr_is_constant(right)) - return expr_binary_error(ctx, right, rel, - "Right hand side of relational " - "expression (%s) must be constant", - expr_op_symbols[rel->op]); - if (expr_is_constant(left)) - return expr_binary_error(ctx, left, right, - "Relational expression (%s) has " - "constant value", - expr_op_symbols[rel->op]); - if (rel->op == OP_IMPLICIT) { switch (right->ops->type) { case EXPR_RANGE: @@ -901,6 +890,17 @@ static int expr_evaluate_relational(struct eval_ctx *ctx, struct expr **expr) } } + if (!expr_is_constant(right)) + return expr_binary_error(ctx, right, rel, + "Right hand side of relational " + "expression (%s) must be constant", + expr_op_symbols[rel->op]); + if (expr_is_constant(left)) + return expr_binary_error(ctx, left, right, + "Relational expression (%s) has " + "constant value", + expr_op_symbols[rel->op]); + switch (rel->op) { case OP_LOOKUP: /* A literal set expression implicitly declares the set */ |