File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ bool ArgumentTypeCheckCompletionCallback::addPossibleParams(
37
37
}
38
38
39
39
ArrayRef<AnyFunctionType::Param> ParamsToPass =
40
- Res.FuncTy ->getAs <AnyFunctionType>()->getParams ();
40
+ Res.FuncTy ->lookThroughAllOptionalTypes ()
41
+ ->getAs <AnyFunctionType>()
42
+ ->getParams ();
41
43
42
44
ParameterList *PL = nullptr ;
43
45
if (Res.FuncD ) {
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
3
+
4
+ func foo( _ x: ( ( _ x: Int , _ y: Int ) -> Void ) ? ) {
5
+ x ? ( 1 , #^OPTIONAL_PARAMETER^#)
6
+ // OPTIONAL_PARAMETER: Begin completions
7
+ // OPTIONAL_PARAMETER-DAG: Literal[Integer]/None/TypeRelation[Convertible]: 0[#Int#]; name=0
8
+ // OPTIONAL_PARAMETER: End completions
9
+ }
You can’t perform that action at this time.
0 commit comments