Skip to content

[QoI] Unify member diagnostics into one FailureDiagnosis method #9538

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
May 17, 2017

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 12, 2017

This changes aim to unify logic behind member diagnostics
into a single method instead of maintaining different versions
in visitUnresolvedMemberExpr, visitSubscriptExpr,
visitUnresolvedDotExpr and diagnoseGeneralMemberFailure.
Since all of aforementioned methods do the same thing, with
minor expression specific differences, it makes sense to put
most of the logic into a single place and provide appropriate
callbacks to implement expression specific logic.

@xedin
Copy link
Contributor Author

xedin commented May 12, 2017

@swift-ci please smoke test

@xedin xedin force-pushed the unify-member-diagnostics branch from 89bd37d to 7e9b892 Compare May 12, 2017 20:38
@xedin
Copy link
Contributor Author

xedin commented May 12, 2017

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented May 12, 2017

@swift-ci please smoke test Linux platform

@xedin
Copy link
Contributor Author

xedin commented May 12, 2017

/cc @slavapestov @rudkx I think this is ready for initial review. All of the scattered logic for diagnosing inaccessible/unavailable and other member lookup related cases is now in one place and all four related methods (UnresolvedDot, UnresolvedMember, Subscript, and GeneralMemberFailure) use it.

@xedin xedin changed the title [WIP] [QoI] Unify member diagnostics into one FailureDiagnosis method [QoI] Unify member diagnostics into one FailureDiagnosis method May 16, 2017
@xedin xedin force-pushed the unify-member-diagnostics branch 2 times, most recently from 4153aba to 883a2c7 Compare May 16, 2017 05:56
@xedin
Copy link
Contributor Author

xedin commented May 16, 2017

@swift-ci please smoke test and merge

@xedin
Copy link
Contributor Author

xedin commented May 16, 2017

@swift-ci please smoke test OS X platform

@xedin
Copy link
Contributor Author

xedin commented May 16, 2017

@slavapestov Any idea why typo_test started producing UnsafePointer<(Any)> vs. UnsafePointer<Any> in OS X typo_correction.swift test, could be in any way related to SE-0110?

@xedin
Copy link
Contributor Author

xedin commented May 16, 2017

@swift-ci please clean smoke test

@xedin xedin force-pushed the unify-member-diagnostics branch from 883a2c7 to dd9469e Compare May 17, 2017 19:00
@xedin
Copy link
Contributor Author

xedin commented May 17, 2017

@swift-ci please smoke test and merge

@xedin xedin merged commit 24d5e87 into swiftlang:master May 17, 2017
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.

2 participants