Skip to content
Snippets Groups Projects
Verified Commit c5d223a7 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix semantics of ExprNode::maxLag(), maxLead() and maxLagWithDiffsExpanded() with constants

Those methods can return a negative value in some cases. For example,
maxLead(x₋₁) = −1.

But constants were always returning a value of zero, which means that we had
inconsistent behaviour like maxLead(x₋₁ + 2) = 0.

This commits fixes the behaviour by making these methods return the smallest
possible integer when called on constants.
parent 37cc0a0d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment