nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

`opaqueGenericParameters` rule fails when `@_specialize(where S == ...)` attribute is added #1684

Closed inamiy closed 2 months ago

inamiy commented 2 months ago

When @_specialize(where S == ...) attribute is added before func declaration, this func's generic parameter <S: Sequence<Element>> cannot be replaced with opaque some Sequence<Element>. But swiftformat (as of ver 0.53.7) + opaqueGenericParameters rule formats this wrongly.

nicklockwood commented 2 months ago

@inamiy fixed in 0.53.8

inamiy commented 2 months ago

@nicklockwood Thank you for quick update!