Skip to content

Conversation

FelixHerrmann
Copy link

With the release of Xcode 15 we now have Swift 5.9. With that there comes a new warning about shadowing generic parameters, see swiftlang/swift#62767. There is one place in this repository affected:
Screenshot 2023-09-14 at 12 48 56

Implementation Details

It turns out that we don't need the generic parameter on this type at all, it's a private struct nested inside the type that already has the parameter defined, so there is no need to parse it through. Another approach would be to just rename the shadowed, inner parameter to something like V but IMO we should just remove it. Let me know if there are any concerns...

I have also fixed one failing test, the compare json had the opposite order compared to how it is defined in the CodingKeys.

Conclusion

This warning will be an error in Swift 6 so we should get that fix in, the sooner the better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant