Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The approach in this PR is to elevate the output of maybeIntervalK to a generalized ChannelSpec object {value, scale}.
However this breaks a few tests, because stackY passes x directly to valueof, which expects a Channel, not a generalized ChannelSpec.
To fix this locally I did cb29daa, but then I realized that (maybe) such ChannelSpec could be everywhere we call valueof… In that case, wouldn't the correct fix be to do this in valueof instead, not just only in the stack function:
But this is such an encompassing change, that I'm a bit nervous, and confused to know if it's correct.
Re: bd80e5f it is possible to be more meticulous and only elevate to a {value, scale} object if the scale is not undefined. But I wanted to keep it simple to discuss the principle first.
Also, if I am meticulous here I hide the tests cases that break, which is not a good idea; so we'll probably need another test case on top of this! Speaking of which, the additional test case is a bit ad hoc — since we only have "x" or null the choice is quite limited. But it would be nice if we had a motivated use case.
closes #1329