Skip to content

Fix #7421: Insert missing <outdent> tokens where a region ends #7429

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

Merged
merged 4 commits into from
Oct 28, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 15, 2019

No description provided.

@odersky
Copy link
Contributor Author

odersky commented Oct 15, 2019

@smarter: No, it works with or without then.

@smarter
Copy link
Member

smarter commented Oct 20, 2019

I worry this might be too permissive, e.g. the following becomes valid:

    if (args.length > 0)
      1
      if (args.length > 1)
        2
      else 3 else 4

Maybe a warning recommending adding a new unindented line would be appropriate.

@smarter
Copy link
Member

smarter commented Oct 21, 2019

I worry this might be too permissive

Maybe we can restrict this by only calling in.observeOutdented() if the previous token was a closing brace ?

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2019

I worry this might be too permissive, e.g. the following becomes valid:

But why reject it?

@odersky odersky merged commit d06a5ff into scala:master Oct 28, 2019
@odersky odersky deleted the fix-#7421 branch October 28, 2019 17:48
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

Successfully merging this pull request may close these issues.

3 participants