@@ -13,7 +13,7 @@ func bar(_ x: borrowing #^FUNC_PARAM_2?check=SPECIFIER^#) {}
1313
1414struct S {
1515 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^# { }
1717}
1818
1919// Don't complete for enum cases.
@@ -22,18 +22,32 @@ enum E {
2222 case f( x: #^ENUM_CASE_LABELED_TY ? check= SPECIFIER_NOT^#)
2323}
2424
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^#
2732
2833// Or for a return type.
29- func bar( ) -> #^RETURN_TY ? check= SPECIFIER_NOT ^# { }
34+ func bar( ) -> #^RESULT_TY ? check= RESULT;check = RESULT_NOT ^# { }
3035
3136// SPECIFIER-DAG: Keyword[inout]/None: inout; name=inout
3237// SPECIFIER-DAG: Keyword/None: consuming; name=consuming
3338// SPECIFIER-DAG: Keyword/None: borrowing; name=borrowing
3439// SPECIFIER-DAG: Keyword/None: isolated; name=isolated
40+ // SPECIFIER-DAG: Keyword/None: sending; name=sending
3541
3642// SPECIFIER_NOT-NOT: Keyword[inout]/None: inout
3743// SPECIFIER_NOT-NOT: Keyword/None: consuming
3844// SPECIFIER_NOT-NOT: Keyword/None: borrowing
3945// 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