File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
validation-test/IDE/crashers_2_fixed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4311,7 +4311,7 @@ class CompletionOverrideLookup : public swift::VisibleDeclConsumer {
4311
4311
}
4312
4312
4313
4313
void getOverrideCompletions (SourceLoc Loc) {
4314
- if (!CurrDeclContext->getSelfNominalTypeDecl ())
4314
+ if (!CurrDeclContext->isTypeContext ())
4315
4315
return ;
4316
4316
if (isa<ProtocolDecl>(CurrDeclContext))
4317
4317
return ;
Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ ParserResult<Pattern> Parser::parsePattern() {
921
921
}
922
922
923
923
case tok::code_complete:
924
- if (!CurDeclContext->getSelfNominalTypeDecl ()) {
924
+ if (!CurDeclContext->isTypeContext ()) {
925
925
// This cannot be an overridden property, so just eat the token. We cannot
926
926
// code complete anything here -- we expect an identifier.
927
927
consumeToken (tok::code_complete);
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename=%s
2
+
3
+ extension UnknownTy {
4
+ var #^COMPLETE^#
5
+ }
You can’t perform that action at this time.
0 commit comments