Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression introduced by "remove fork analysis from tail call optimization (ref #86)" #118

Closed
wader opened this issue Aug 20, 2021 · 2 comments

Comments

@wader
Copy link
Contributor

wader commented Aug 20, 2021

Hi, the commit c08e56f seems to have introduced a regression:

test.jq

def f:
  if .a then .a | f
  else .
  end;

{
  "a": {
    "b": {
      "c": 1
    }
  }
} | f | 2

jq 1.6

$ jq -nf test.jq
2

gojq master (58fe974):

$ go run cmd/gojq/main.go -nf test.jq
{
  "b": {
    "c": 1
  }
}

gojq c08e56f~1

$ go run cmd/gojq/main.go -nf test.jq
2
@itchyny
Copy link
Owner

itchyny commented Aug 21, 2021

Nice catch, fixed.

@wader
Copy link
Contributor Author

wader commented Aug 21, 2021

👍 thanks for quick fix

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

No branches or pull requests

2 participants