@@ -13,7 +13,7 @@ func bar(_ x: borrowing #^FUNC_PARAM_2?check=SPECIFIER^#) {}
13
13
14
14
struct S {
15
15
init ( x: #^INIT_PARAM? check= SPECIFIER^#) { }
16
- subscript( x: #SUBSCRIPT_PARAM? check= SPECIFIER#) { }
16
+ subscript( x: #SUBSCRIPT_PARAM? check= SPECIFIER#) -> #^SUBSCRIPT_RET ? check = RESULT;check = RESULT_NOT^# { }
17
17
}
18
18
19
19
// Don't complete for enum cases.
@@ -22,18 +22,32 @@ enum E {
22
22
case f( x: #^ENUM_CASE_LABELED_TY ? check= SPECIFIER_NOT^#)
23
23
}
24
24
25
- // Don't complete for a regular variable type.
26
- let x: #^VAR_TY? check = SPECIFIER_NOT^#
25
+ // Don't complete the parameter specifiers for a variable type.
26
+ //
27
+ // Note that we will still complete 'sending' here, even though it isn't
28
+ // currently supported for computed properties (it is supported for functions
29
+ // and subscripts though).
30
+ let x: #^VAR_TY? check = RESULT;check= RESULT_NOT^#
31
+ var y: #^VAR_TY2? check = RESULT;check= RESULT_NOT^#
27
32
28
33
// Or for a return type.
29
- func bar( ) -> #^RETURN_TY ? check= SPECIFIER_NOT ^# { }
34
+ func bar( ) -> #^RESULT_TY ? check= RESULT;check = RESULT_NOT ^# { }
30
35
31
36
// SPECIFIER-DAG: Keyword[inout]/None: inout; name=inout
32
37
// SPECIFIER-DAG: Keyword/None: consuming; name=consuming
33
38
// SPECIFIER-DAG: Keyword/None: borrowing; name=borrowing
34
39
// SPECIFIER-DAG: Keyword/None: isolated; name=isolated
40
+ // SPECIFIER-DAG: Keyword/None: sending; name=sending
35
41
36
42
// SPECIFIER_NOT-NOT: Keyword[inout]/None: inout
37
43
// SPECIFIER_NOT-NOT: Keyword/None: consuming
38
44
// SPECIFIER_NOT-NOT: Keyword/None: borrowing
39
45
// SPECIFIER_NOT-NOT: Keyword/None: isolated
46
+ // SPECIFIER_NOT-NOT: Keyword/None: sending
47
+
48
+ // RESULT_NOT-NOT: Keyword[inout]/None: inout
49
+ // RESULT_NOT-NOT: Keyword/None: consuming
50
+ // RESULT_NOT-NOT: Keyword/None: borrowing
51
+ // RESULT_NOT-NOT: Keyword/None: isolated
52
+
53
+ // RESULT-DAG: Keyword/None: sending
0 commit comments