-
-
Save jasdev/2abea571b37be824f2cac5c03fb3c353 to your computer and use it in GitHub Desktop.
Dictionary merging with shorthand argument names.
This file contains 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
tabGroup1 | |
.merging(tabGroup2, uniquingKeysWith: { $0 }) // ❌ “Contextual closure type `(Tab, Tab) throws -> Tab` | |
// expects 2 arguments, but 1 was used in closure body.” | |
tabGroup1 | |
.merging(tabGroup2, uniquingKeysWith: { $1 }) // Referencing the second of the two-argument closure compiles fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment