Bug when using `withOrder` method in ParseState.
Closed this issue · 0 comments
mvanaken commented
When you would use the withOrder
method in ParseState to create a ParseState with a different ParseGraph, then the scopeDepth that is stored within the ParseState does not match the ParseGraph anymore. This may result into an error when using scoped references, where no value is found, because the scopeDepth is too high to begin with.
With that in mind, isn't it better to store the scopeDepth within the ParseGraph, instead of ParseState? Since the scopeDepth can be determined by traversing the ParseGraph, it shows that it this bug can be fixed if we move the field.