Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Swift 5.3 trailing closure warnings #2484

Closed
wants to merge 1 commit into from

Conversation

tanner0101
Copy link
Member

Fixes warnings about trailing closure matching behavior changes in Swift 5.3.

The main offender is app.test which has two trailing closures beforeRequest and afterResponse. Given that Swift is switching to forward matching for trailing closures, the previously used syntax would match beforeRequest instead of afterResponse. To remedy this, the label is now used explicitly.

@tanner0101 tanner0101 added enhancement New feature or request semver-patch Internal changes only labels Aug 28, 2020
@tanner0101 tanner0101 added this to Awaiting Review in Vapor 4 via automation Aug 28, 2020
@tanner0101
Copy link
Member Author

tanner0101 commented Aug 28, 2020

@grundoon
Copy link
Member

Not exactly a huge fan, but maybe split test into 2 signatures (one including beforeRequest:, one with just the single closure)?

@tanner0101
Copy link
Member Author

Closing in favor of #2485

@tanner0101 tanner0101 closed this Aug 28, 2020
Vapor 4 automation moved this from Awaiting Review to Done Aug 28, 2020
@tanner0101 tanner0101 deleted the tn-closure-matching branch August 28, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-patch Internal changes only
Projects
Vapor 4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants