Skip to content

Build error: 'some' types cannot be used in constraints on existential types #2239

@fl034

Description

@fl034

I have a protocol with this generic function that gets formatted into a build error.

Image
  • Swift format version 0.58.2
  • Xcode 26.0.1
  • .swiftformat file:
# options
--maxwidth 120

# rules
--importgrouping alphabetized
--indent 4
--indentcase false
--self remove
--selfrequired 
--trimwhitespace always
--xcodeindentation disabled

#Disabled Rules
--disable andOperator
--disable preferKeyPath
--disable redundantType
--disable wrapMultilineStatementBraces

#Enabled Rules
--enable markTypes

#Exlude Files
--exclude **/*.generated.swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions