Skip to content

[CSDiagnostics] Add custom diagnostic for invalid @autoclosure forwarding #20693

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

Merged
merged 3 commits into from
Nov 22, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Nov 21, 2018

Suggest to add () (form a call) to correctly forward argument function
originated from @autoclosure parameter to function parameter itself
marked as @autoclosure.

@xedin xedin requested a review from rudkx November 21, 2018 09:09
@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2018

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2018

@swift-ci please test source compatibility

…ks for subscripts/members

Currently logic in `matchCallArguments` could only detect argument
being an @autoclosure parameter for normal calls and operators.

This patch extends it to support subscripts and unresolved member calls.
…ding

Suggest to add `()` (form a call) to correctly forward argument function
originated from `@autoclosure` parameter to function parameter itself
marked as `@autoclosure`.
@xedin xedin force-pushed the forward-autoclosure-diagnostic branch from d242f27 to 07e5d54 Compare November 21, 2018 20:17
@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2018

@swift-ci please test

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