Skip to content

Commit cf12f2b

Browse files
committed
[CodeComplete] Add test case for rdar://88883761
This test was already passing. Probably fixed by migrating to solver-based completions. rdar://88883761
1 parent adc9cc9 commit cf12f2b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/IDE/complete_prefer_function_call_if_both_reference_and_call_are_possible.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ func testTask(route: Route) {
2828
route.#^IN_TASK?check=COMPLETE^#
2929
}
3030
}
31+
32+
protocol Builder {
33+
func recv<T>(_: (T) throws -> Void)
34+
}
35+
36+
struct S {
37+
func foo(x: Int) throws {}
38+
func test(builder: Builder) {
39+
builder.recv(#^IN_CONTEXT_FOR_UNAPPLIED_REF^#)
40+
}
41+
}
42+
// IN_CONTEXT_FOR_UNAPPLIED_REF-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Convertible]: foo(x:)[#(Int) throws -> ()#]; name=foo(x:)
43+
// IN_CONTEXT_FOR_UNAPPLIED_REF-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Convertible]: test(builder:)[#(any Builder) -> ()#]; name=test(builder:)

0 commit comments

Comments
 (0)