Last active
February 2, 2016 23:32
-
-
Save blixt/440699fb7db718aaba89 to your computer and use it in GitHub Desktop.
Swift segfaulting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Participant { | |
let identifiers: [(label: String?, value: String)] | |
} | |
// This segfaults. Combining the two maps or changing "" to nil works. | |
let participants = ["a", "b", "c"] | |
.map { ("", $0) } | |
.map { Participant(identifiers: [$0]) } | |
// Update: Here's an error from a later build of Swift which explains the error. | |
<REPL Input>:1:85: error: cannot express tuple conversion '(String, String)' to '(label: String?, value: String)' (aka '(label: Optional<String>, value: String)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment