Skip to content

Replace use of getArchetype() in diagnoseGenericParameterErrors() #1200

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
Feb 5, 2016

Conversation

gregomni
Copy link
Contributor

@gregomni gregomni commented Feb 4, 2016

This is a quick follow-up to
#1160, to replace the becoming deprecated getArchetype() with doing the same thing via calling through to ArchetypeBuilder with a declContext.

Uses findGenericSubstitutions() to do so. So this site could take advantage of destructuring of more complex params containing generics. Right now, though, that never happens. For complex params the (unfortunately, worse) diagnosis happens in diagnoseFailureForExpr() on the argument expression before reaching here. I’d like to improve that in future work.

No new functionality to add tests for, all tests pass.

This is a quick follow-up to
<swiftlang#1160>, to replace the becoming
deprecated getArchetype() with doing the same thing via calling through
to ArchetypeBuilder with a declContext.

Uses findGenericSubstitutions() to do so. So this site could take
advantage of destructuring of more complex params containing generics.
Right now, though, that never happens. For complex params the
(unfortunately, worse) diagnosis happens in diagnoseFailureForExpr() on
the argument expression before reaching here. I’d like to improve that
in future work.
DougGregor added a commit that referenced this pull request Feb 5, 2016
Replace use of getArchetype() in diagnoseGenericParameterErrors()
@DougGregor DougGregor merged commit ff8e913 into swiftlang:master Feb 5, 2016
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