Skip to content

Commit 80cc677

Browse files
committed
Be more explicit that the flatMap returns a Array not an Optional
1 parent 239ec92 commit 80cc677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/WebIDLToSwift/UnionType+SwiftRepresentable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ extension UnionType: SwiftRepresentable {
7272
}
7373

7474
var initializers: [SwiftSource] {
75-
zip(sortedTypes, sortedNames).flatMap { type, name in
75+
zip(sortedTypes, sortedNames).flatMap { (type, name) -> [SwiftSource] in
7676
let basicInitializer: [SwiftSource] = ["""
7777
init(_ \(name): \(type)) {
7878
let val: \(self.name) = .\(name)(\(name))

0 commit comments

Comments
 (0)