Skip to content

[4.1] [Type checker] Don't check near-miss candidates of the wrong kind. #13309

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Dec 7, 2017

  • Explanation: Near-miss warnings would consider irrelevant declarations within the current scope, causing a compiler assertion.
  • Scope: Only affects diagnostics, eliminating a crash that affected a project in the source compatibility suite.
  • Issue: SR-6334 / rdar://problem/35832679
  • Reviewed by: @slavapestov
  • Risk: Very low. Early-exits from a diagnostic that was asserting.
  • Testing: Added compiler regression tests, checked source compatibility suite.

slavapestov
slavapestov previously approved these changes Dec 7, 2017
Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than busted formatting

// RUN: %target-swift-frontend %s -emit-ir -o -

func f() {
enum NotAnError: Swift.Error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, will fix on master.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here. I'm not a monster.

Fixes rdar://problem/35832679.

(cherry picked from commit 6eec137)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

2 similar comments
@DougGregor
Copy link
Member Author

@swift-ci please nominate

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@DougGregor DougGregor merged commit a7e21d4 into swiftlang:swift-4.1-branch Dec 8, 2017
@DougGregor DougGregor deleted the rdar-35832679-4.1 branch December 8, 2017 07:48
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