curv icon indicating copy to clipboard operation
curv copied to clipboard

lib.builder: '}' doesn't pop the origin stack

Open doug-moen opened this issue 4 years ago • 1 comments

lib.builder is buggy and the behaviour does not match the documentation.

Specifically, the '{' operator pushes the current origin onto a stack. The '}' operator contains code whose apparent intent is to pop the previously pushed origin, and restore the origin to what it was when '{' was called. But the code is buggy, and it doesn't actually do that. The stack isn't popped, and the current origin doesn't change.

The only thing that '}' actually does is set the origin_prev field to the current origin. And that has no effect if the next operation is '*'. It only has an effect if the very next operation is '{'.

Assigned to: @lf94

doug-moen avatar Sep 30 '21 16:09 doug-moen

Thanks @doug-moen , I'll open a PR tonight. ☺

lf94 avatar Sep 30 '21 16:09 lf94