File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
test/SourceKit/CursorInfo Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ class NodeFinder : ASTWalker {
150
150
}
151
151
152
152
if (auto VD = dyn_cast<ValueDecl>(D)) {
153
- if (VD->hasName ()) {
153
+ // FIXME: ParamDecls might be closure parameters that can have ambiguous
154
+ // types. The current infrastructure of just asking for the VD's type
155
+ // doesn't work here. We need to inspect the constraints system solution.
156
+ if (VD->hasName () && !isa<ParamDecl>(D)) {
154
157
assert (Result == nullptr );
155
158
Result = std::make_unique<NodeFinderDeclResult>(VD);
156
159
return Action::Stop ();
Original file line number Diff line number Diff line change
1
+ func save( _ record: Int , _ x: ( String ) -> Void ) { }
2
+
3
+ func test( ) {
4
+ let record = 2
5
+ // RUN: %sourcekitd-test -req=cursor -pos=%(line + 1):19 %s -- %s
6
+ save ( record) { ( record) in
7
+ }
8
+ }
You can’t perform that action at this time.
0 commit comments