Skip to content

[IDE][Sema] Fix code completion unreachable/hang in TypeBase::getContextSubtitutions #26799

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

Conversation

nathawes
Copy link
Contributor

There are paths from code completion giving it an UnboundGenericType, which it doesn't expect.

This patch:

  1. Updates the code completion paths to not attempt substitution on UnboundGenericTypes
  2. Updates getContextSubstitutions to assert and break out of the loop when given an unhandled type to avoid hanging release builds if a similar bug occurs in future.

Resolves rdar://problem/53959978

…extSubtitutions

There are paths from Code completion giving it an UnboundGenericType, which it
doesn't expect.

This patch:
1) Updates the code completion paths to not attempt substitution on
   UnboundGenericTypes
2) Updates getContextSubstitutions to assert and break out of the loop when
   given an unhandled type to avoid hanging release builds if a similar bug
   occurs in future.

Resolves rdar://problem/53959978
@nathawes
Copy link
Contributor Author

@swift-ci please test

@rintaro rintaro merged commit 8c4ab0c into swiftlang:master Aug 23, 2019
@rintaro
Copy link
Member

rintaro commented Aug 23, 2019

Thank you Nathan!

@nathawes nathawes deleted the r53959978-code-completion-hang-in-getContextSubstitutions branch August 23, 2019 17:11
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