Skip to content

InCase has indent width of case#25295

Draft
som-snytt wants to merge 1 commit intoscala:mainfrom
som-snytt:issue/25002-indent-in-guard
Draft

InCase has indent width of case#25295
som-snytt wants to merge 1 commit intoscala:mainfrom
som-snytt:issue/25002-indent-in-guard

Conversation

@som-snytt
Copy link
Contributor

Fixes #25002

Set the indent width of InCase using the offset of case instead of in handleNewLine.

@som-snytt
Copy link
Contributor Author

Needs a good tweak.

For example, this seems to look like a badly formed function literal because of the arrow, which is supposed to close the region.

    sym.namedType.allMembers.iterator.map(_.symbol)
      .collect {
         case sym if
          (!sym.is(dotc.core.Flags.ModuleVal) || sym.is(dotc.core.Flags.Given)) &&
          !sym.flags.isAllOf(dotc.core.Flags.Enum | dotc.core.Flags.Case | dotc.core.Flags.JavaStatic) =>
              sym.asInstanceOf[Symbol]
      }.toList

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.

No colon for you! in guard expression

1 participant