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

[4.1] [Type checker] Make redeclaration checking validate fewer declarations. #13657

Merged
merged 1 commit into from Jan 2, 2018

Conversation

Projects
None yet
1 participant
@DougGregor
Copy link
Member

DougGregor commented Jan 1, 2018

Redeclaration checking was validating all declarations with the same
base name as the given declaration (and in the same general nominal
type), even when it was trivial to determine that the declarations
could not be conflicting. Separate out the easy structural checks
(based on kind, full name, instance vs. non-instance member, etc.) and
perform those first, before validation.

Fixes SR-6558 / rdar://problem/36068194, a case where redeclaration checking caused some
unnecessary recursion in the type checker.

[Type checker] Make redeclaration checking validate fewer declarations.
Redeclaration checking was validating all declarations with the same
base name as the given declaration (and in the same general nominal
type), even when it was trivial to determine that the declarations
could not be conflicting. Separate out the easy structural checks
(based on kind, full name, instance vs. non-instance member, etc.) and
perform those first, before validation.

Fixes SR-6558, a case where redeclaration checking caused some
unnecessary recursion in the type checker.

(cherry picked from commit 8b58b0d)
@DougGregor

This comment has been minimized.

Copy link
Member Author

DougGregor commented Jan 1, 2018

@swift-ci please test

@DougGregor DougGregor merged commit 690c9b9 into apple:swift-4.1-branch Jan 2, 2018

4 checks passed

Swift Test Linux Platform 10623 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 53235 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@DougGregor DougGregor deleted the DougGregor:redecl-fewer-validations-4.1 branch Jan 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.