Skip to content

[Type checker] Basic ambiguity resolution + diagnostics for dynamic replacement #21502

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 1 commit into from
Dec 21, 2018

Conversation

DougGregor
Copy link
Member

We weren't doing much validation when dynamically replacing storage
declarations, and has an assert() that should be an error. Clean up this
area a bit, dealing with simple ambiguities (i.e., there are two
properties or subscripts with different type signatures; pick the
matching one) and reporting an error when there is a true ambiguity.

Fixes rdar://problem/46737657.

…eplacement.

We weren't doing much validation when dynamically replacing storage
declarations, and has an assert() that should be an error. Clean up this
area a bit, dealing with simple ambiguities (i.e., there are two
properties or subscripts with different type signatures; pick the
matching one) and reporting an error when there is a true ambiguity.

Fixes rdar://problem/46737657.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

}

auto interfaceType = value->getInterfaceType();
if (interfaceType->hasError())
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be necessary -- we always build a function type with the correct 'shape' nowadays

@swift-ci swift-ci merged commit 36c0ebf into swiftlang:master Dec 21, 2018
@DougGregor DougGregor deleted the dynamic-replacement-ambiguity branch December 21, 2018 21:19
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.

3 participants