Skip to content

Swift-format wants to break code when @availablity is behind #if #1012

@ahoppen

Description

@ahoppen

Formatting

 #if true
@MainActor
#endif 
class Foo {
}

produces

#if true
  @MainActor
#endif class Foo {}

Which is not valid Swift because #endif is not on its own line.

rdar://150646759

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions