mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Disable completion-like cursor info for ParamDecls
This commit is contained in:
@@ -150,7 +150,10 @@ private:
|
||||
}
|
||||
|
||||
if (auto VD = dyn_cast<ValueDecl>(D)) {
|
||||
if (VD->hasName()) {
|
||||
// FIXME: ParamDecls might be closure parameters that can have ambiguous
|
||||
// types. The current infrastructure of just asking for the VD's type
|
||||
// doesn't work here. We need to inspect the constraints system solution.
|
||||
if (VD->hasName() && !isa<ParamDecl>(D)) {
|
||||
assert(Result == nullptr);
|
||||
Result = std::make_unique<NodeFinderDeclResult>(VD);
|
||||
return Action::Stop();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
func save(_ record: Int, _ x: (String) -> Void) {}
|
||||
|
||||
func test() {
|
||||
let record = 2
|
||||
// RUN: %sourcekitd-test -req=cursor -pos=%(line + 1):19 %s -- %s
|
||||
save(record) { (record) in
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user