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

0.10.0 formatting broke magic foreach #380

Closed
powercode opened this issue Mar 15, 2017 · 4 comments
Closed

0.10.0 formatting broke magic foreach #380

powercode opened this issue Mar 15, 2017 · 4 comments
Assignees
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@powercode
Copy link

powercode commented Mar 15, 2017

(0 .. 10).Foreach{$_} is formatted into (0 .. 10).Foreach {$_} which the compiler will not accept.

Same thing with .Where{}

@powercode
Copy link
Author

It can be worked around by using the .Foreach( {$_} ) construct instead, but it is bad since it breaks scripts by just saving them when auto formatting is enabled.

@daviwil
Copy link
Contributor

daviwil commented Mar 15, 2017

Hey Staffan, thanks for filing this! @bgelens also noticed it. We'll get it fixed :)

@daviwil daviwil added the Issue-Bug A bug to squash. label Mar 15, 2017
@daviwil daviwil modified the milestones: 0.10.1, 0.11.0 Mar 15, 2017
@daviwil daviwil modified the milestones: 0.11.0, 0.12.0 Mar 22, 2017
@daviwil
Copy link
Contributor

daviwil commented Apr 3, 2017

Hey @kapilmb, here's one more formatting issue we need to look into. Looks like there are two cases where we should be making an exception for the "space before open brace" rule, .Foreach{ and .Where{, both of which have special behavior in PowerShell.

@kapilmb
Copy link

kapilmb commented Apr 3, 2017

Oops, looks like this flew under my radar. Will have a fix soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

3 participants