Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix over-eager caching of Now variable (#191)
Closes #185. I gave a shot at making tests for this, but it's less trivial than it seems at first glance. I manually confirmed this fixes the bug for now. To explain what's going on here, you have to recognize that `newRulesVariable` is used during constraint compilation (for constant folding) and `newThisVariable` is used during the actual activation. We don't want `now` to get constant-folded, so we should make sure it is only defined at evaluation time, not before. I think this was most likely switched on accident and probably also means that the `now` variable was not working in custom constraints.
- Loading branch information