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

Router: handle parameter indent.fewerBraces #3557

Merged
merged 2 commits into from
Jun 16, 2023
Merged

Conversation

kitbellew
Copy link
Collaborator

Now that dotty compiler supports indented fewer-braces chains since v3.3.1-RC1, let's implement this formatting. For #3489.

Now that dotty compiler supports indented fewer-braces chains since
v3.3.1-RC1, let's implement this formatting.
@kitbellew kitbellew requested a review from tgodzik June 12, 2023 19:59
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kitbellew kitbellew merged commit a5dc83a into scalameta:master Jun 16, 2023
@kitbellew kitbellew deleted the 3489 branch June 16, 2023 13:01
@xerial
Copy link

xerial commented Jun 30, 2023

@kitbellew It looks like a bug introduced with this change that fails to insert a new line after extension method:

For example:

    given IntervalLike[MyClass] with
      extension (a: MyClass)
        def start: Long = a.createdAt
        def end: Long   = a.endAt

This code will be formatted as follows:

    given IntervalLike[MyClass] with
      extension (a: MyClass) def start: Long = a.createdAt   //  causes compilation error with missing new line
      def end: Long                          = a.endAt

@kitbellew
Copy link
Collaborator Author

@xerial thank you for reporting, could you perhaps create a separate issue next time?

as to this example, the bug was indeed introduced in the latest version but not via this change, it came from scalameta. someone has also reported it, and the fix will be in the next version.

@xerial
Copy link

xerial commented Jun 30, 2023

Thanks. Will do. I was overwhelmed by the number of items I need to fill in the issue template 😅

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