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

nimpretty wrongly adds empty newlines inside proc signature #9506

Closed
timotheecour opened this Issue Oct 25, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@timotheecour
Copy link
Collaborator

timotheecour commented Oct 25, 2018

sorry for the odd-looking example but I found a simple (yet odd looking) example that exhibits same behavior as a more complex real case where there were a number of types and dependencies in proc signature that I didnt' want to reduce directly; instead, the following example reproduces the issue:

proc fun2(a = "fooo" & "bar" & "bar" & "bar" & "bar" & ("bar" & "bar" & "bar") & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar"): auto =
  discard

fun()

nimpretty output:

proc fun2(a = "fooo" & "bar" & "bar" & "bar" & "bar" & (
    
    
    
    
    "bar" & "bar" & "bar") & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar" & "bar"): auto =
  discard

fun()

note:

I marked it as low priority since the cases where this behavior would trigger might be rare (idk)

@timotheecour timotheecour changed the title nimpretty wrongly adds empty newlines inside proc signature [minor] nimpretty wrongly adds empty newlines inside proc signature Oct 25, 2018

@timotheecour timotheecour changed the title [minor] nimpretty wrongly adds empty newlines inside proc signature nimpretty wrongly adds empty newlines inside proc signature Oct 25, 2018

@Araq Araq removed the Low Priority label Oct 25, 2018

@Araq Araq closed this in 03005fd Oct 25, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Nov 1, 2018

narimiran added a commit that referenced this issue Nov 1, 2018

narimiran added a commit that referenced this issue Nov 1, 2018

nimpretty: fixes #9506
(cherry picked from commit 03005fd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment