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 printing unusual Exprs inside nested quote #35134

Closed
JeffBezanson opened this issue Mar 16, 2020 · 1 comment · Fixed by #35479
Closed

regression printing unusual Exprs inside nested quote #35134

JeffBezanson opened this issue Mar 16, 2020 · 1 comment · Fixed by #35479
Assignees
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version

Comments

@JeffBezanson
Copy link
Member

Reported on slack. Caused by part of #32423; we will probably have to revert that bit.

julia> ex = Expr(:quote, Expr(:quote, Expr(:foo)))
:(:(:($(Expr(:foo)))))

julia> eval(Meta.parse(repr(ex))) == ex
false
@JeffBezanson JeffBezanson added regression Regression in behavior compared to a previous version display and printing Aesthetics and correctness of printed representations of objects. labels Mar 16, 2020
@simeonschaub
Copy link
Member

Its quite unfortunate that we will always have to print nested quote expressions the verbose way, otherwise we would have to traverse the whole expression tree to make sure there aren't any unusual expressions in there. I'm currently working on a PR to print unusual expressions without the :($(...)) around them if they are not inside another expressions, but turns out, printing expressions in an intuitive way is quite a deep rabbit hole.:grin:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants