Skip to content

[Parse] Don't use getAsNominalTypeOrNominalTypeExtensionContext in Parse #18786

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
Aug 18, 2018

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 17, 2018

DeclContext::getAsNominalTypeOrNominalTypeExtensionContext() getSelfNominalTypeDecl() requires fully parsed AST. Use isTypeContext() instead.

https://bugs.swift.org/browse/SR-8554
rdar://problem/43394866

@rintaro rintaro requested a review from benlangmuir August 17, 2018 10:19
@rintaro
Copy link
Member Author

rintaro commented Aug 17, 2018

@swift-ci Please smoke test

@@ -4314,7 +4314,7 @@ class CompletionOverrideLookup : public swift::VisibleDeclConsumer {
}

void getOverrideCompletions(SourceLoc Loc) {
if (!CurrDeclContext->getAsNominalTypeOrNominalTypeExtensionContext())
if (!CurrDeclContext->isTypeContext())
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not necessary, but it's low cost.

@DougGregor
Copy link
Member

Thank you!

@jrose-apple
Copy link
Contributor

(Sorry for breaking your merge with #18798.)

`getAsNominalTypeOrNominalTypeExtensionContext()` requires fully parsed
AST. Use `isTypeContext()` instead.

https://bugs.swift.org/browse/SR-8554
rdar://problem/43394866
@rintaro rintaro force-pushed the parse-istypecontext branch from 262134b to 682fc12 Compare August 18, 2018 03:48
@rintaro
Copy link
Member Author

rintaro commented Aug 18, 2018

@swift-ci Please smoke test

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