Nested unary negation causes a declared bind parameter to be reported as undeclared
Author: the-ShallowCreated Jul 11, 2026Updated Jul 15, 2026
repro_2_nested_unary_bind_validation.py
Description
A bind parameter that is syntactically present in nested unary-negation expressions is rejected as undeclared. The server reports error 1552 even though @x appears in the query and x is supplied in bindVars.
This differs from the related incorrect-result issue: this case rejects a valid query instead of returning a wrong successful result.
Environment
- ArangoDB: 3.12.9-4
- Deployment: official Docker image, single server
- OS hosting Docker: Windows / Docker Desktop / WSL2
- API: HTTP cursor API
Steps to reproduce
Query:
RETURN -(-(-@x))Bind variables:
{"x": 1}Expected result
[-1]Actual result
ERR 1552: bind parameter 'x' was not declared in the queryWhy this appears incorrect
@x is explicitly present and supplied. Equivalent expressions using a LET variable or subtraction do not lose bind-parameter recognition. This may share an AST/optimizer root cause with unary bind expressions evaluating to zero, but the externally visible behavior and error path are separate.
Source: arangodb/arangodb