@@ -4067,6 +4067,8 @@ ERROR(throwing_interpolation_without_try,none,
4067
4067
" interpolation can throw but is not marked with 'try'" , ())
4068
4068
ERROR(throwing_call_without_try,none,
4069
4069
" call can throw but is not marked with 'try'" , ())
4070
+ ERROR(throwing_async_let_without_try,none,
4071
+ " reading 'async let' can throw but is not marked with 'try'" , ())
4070
4072
NOTE(note_forgot_try,none,
4071
4073
" did you mean to use 'try'?" , ())
4072
4074
NOTE(note_error_to_optional,none,
@@ -4087,6 +4089,9 @@ ERROR(async_call_without_await,none,
4087
4089
" call is 'async' but is not marked with 'await'" , ())
4088
4090
ERROR(async_call_without_await_in_autoclosure,none,
4089
4091
" call is 'async' in an autoclosure argument that is not marked with 'await'" , ())
4092
+ ERROR(async_call_without_await_in_async_let,none,
4093
+ " call is 'async' in an 'async let' initializer that is not marked "
4094
+ " with 'await'" , ())
4090
4095
WARNING(no_async_in_await,none,
4091
4096
" no calls to 'async' functions occur within 'await' expression" , ())
4092
4097
ERROR(async_call_in_illegal_context,none,
@@ -4098,9 +4103,9 @@ ERROR(await_in_illegal_context,none,
4098
4103
" %select{<<ERROR>>|a default argument|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}0" ,
4099
4104
(unsigned ))
4100
4105
ERROR(async_in_nonasync_function,none,
4101
- " %select{'async'|'await'}0 in %select{a function|an autoclosure}1 that "
4102
- " does not support concurrency" ,
4103
- (bool , bool ))
4106
+ " %select{'async'|'await'|'async let'}0 in "
4107
+ " %select{a function|an autoclosure}1 that does not support concurrency" ,
4108
+ (unsigned , bool ))
4104
4109
NOTE(note_add_async_to_function,none,
4105
4110
" add 'async' to function %0 to make it asynchronous" , (DeclName))
4106
4111
NOTE(note_add_asynchandler_to_function,none,
@@ -4118,6 +4123,21 @@ NOTE(protocol_witness_async_conflict,none,
4118
4123
ERROR(async_autoclosure_nonasync_function,none,
4119
4124
" 'async' autoclosure parameter in a non-'async' function" , ())
4120
4125
4126
+ ERROR(async_not_let,none,
4127
+ " 'async' can only be used with 'let' declarations" , ())
4128
+ ERROR(async_let_not_local,none,
4129
+ " 'async let' can only be used on local declarations" , ())
4130
+ ERROR(async_let_not_initialized,none,
4131
+ " 'async let' binding requires an initializer expression" , ())
4132
+ ERROR(async_let_no_variables,none,
4133
+ " 'async let' requires at least one named variable" , ())
4134
+ ERROR(async_let_without_await,none,
4135
+ " reference to async let %0 is not marked with 'await'" , (DeclName))
4136
+ ERROR(async_let_in_illegal_context,none,
4137
+ " async let %0 cannot be referenced in "
4138
+ " %select{<<ERROR>>|a default argument|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}1" ,
4139
+ (DeclName, unsigned ))
4140
+
4121
4141
ERROR(asynchandler_non_func,none,
4122
4142
" '@asyncHandler' can only be applied to functions" ,
4123
4143
())
0 commit comments