Pattern: Use of init(arrayLiteral:)
Issue: -
Avoid calling this initializer directly. It is used by the compiler when you use an array literal. Instead, create a new set using an array literal as its value by enclosing a comma-separated list of values in square brackets. You can use an array literal anywhere a set is expected by the type context.
Examples of correct code:
let set: Set<Int> = [1, 2]
let set = Set(array)
Examples of incorrect code:
let set = ↓Set(arrayLiteral: 1, 2)
let set = ↓Set.init(arrayLiteral: 1, 2)