Skip to content

Commit

Permalink
Revert "[CodeComplete] Make sure the lookup API can find closure para…
Browse files Browse the repository at this point in the history
…meters. rdar://17968255"

for breaking build bot.

Swift SVN r32255
  • Loading branch information
nkcsgexi committed Sep 26, 2015
1 parent 012f6cb commit 82fd400
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions lib/AST/LookupVisibleDecls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,11 +740,6 @@ void swift::lookupVisibleDecls(VisibleDeclConsumer &Consumer,
if (Loc.isValid()) {
auto CE = cast<ClosureExpr>(ACE);
namelookup::FindLocalVal(SM, Loc, Consumer).visit(CE->getBody());
for (auto Pattern : CE->getParamPatterns()) {
if (auto VD = Pattern->getSingleVar()) {
Consumer.foundDecl(VD, Reason);
}
}
}
} else if (auto ED = dyn_cast<ExtensionDecl>(DC)) {
ExtendedType = ED->getExtendedType();
Expand Down
11 changes: 0 additions & 11 deletions test/IDE/complete_in_closures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INHERITANCE_IN_CLOSURE_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_INHERITANCE_IN_CLOSURE_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ARGUMENT_TYPE_IN_CLOSURE_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLOSURE_PARAM_1 | FileCheck %s -check-prefix=CLOSURE_PARAM_1

// ERROR_COMMON: found code completion token
// ERROR_COMMON-NOT: Begin completions
Expand Down Expand Up @@ -310,13 +309,3 @@ struct LazyVar3 {
func test(x: #^ARGUMENT_TYPE_IN_CLOSURE_2^#
}()
}

func closureTaker(theFunc:(theValue:Int) -> ()) {}

func testClosureParam() {
closureTaker { (theValue) -> () in
#^CLOSURE_PARAM_1^#
}
}
// CLOSURE_PARAM_1: Begin completions
// CLOSURE_PARAM_1-DAG: Decl[LocalVar]/CurrNominal: theValue[#(Int)#]{{; name=.+$}}

0 comments on commit 82fd400

Please sign in to comment.