You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operators should be declared as static functions, not free functions. Operators used to be declared as free functions but at some point (Swift 3?) they can also be declared as static methods on the type that they operate.
Why should this rule be added? Share links to existing discussion about what
the community thinks about this.
New Issue Checklist
New rule request
Operators should be declared as static functions, not free functions. Operators used to be declared as free functions but at some point (Swift 3?) they can also be declared as
static
methods on the type that they operate.the community thinks about this.
https://docs.swift.org/swift-book/LanguageGuide/AdvancedOperators.html#ID42
Non Triggering Examples
Triggering Examples
Only severity.
See README.md for guidelines on when to mark a rule as opt-in.
Opt-in as a lot of code still uses free functions. Potentially there're also cases where declaring in a type is not possible.
The text was updated successfully, but these errors were encountered: