Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

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

Open
doug-moen opened this issue Sep 30, 2021 · 1 comment
Open

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

doug-moen opened this issue Sep 30, 2021 · 1 comment

Comments

@doug-moen
Copy link
Member

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

@lf94
Copy link
Contributor

lf94 commented Sep 30, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants