Swiftlint: pattern_matching_keywords generates an incorrect warning when using enums with named associated values in a switch-case

Created on 6 Sep 2017  路  2Comments  路  Source: realm/SwiftLint

Version 0.22.0

Using enums with named associated values in a switch-case generates an incorrect warning.

Example:
case .someCase(let title, _, let subtitle):

generates a pattern_matching_keywords warning

question

Most helpful comment

This is correct, you should use this instead:

case let .someCase(title, _, subtitle):

All 2 comments

This is correct, you should use this instead:

case let .someCase(title, _, subtitle):

Seems to work. Sorry for the inconvenience and thanks for the fast reply!

Was this page helpful?
0 / 5 - 0 ratings