File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -2497,10 +2497,14 @@ FunctionType::ExtInfo ConstraintSystem::closureEffects(ClosureExpr *expr) {
2497
2497
2498
2498
bool walkToDeclPre (Decl *decl) override {
2499
2499
// Do not walk into function or type declarations.
2500
- if (!isa<PatternBindingDecl>(decl))
2501
- return false ;
2500
+ if (auto *patternBinding = dyn_cast<PatternBindingDecl>(decl)) {
2501
+ if (patternBinding->isAsyncLet ())
2502
+ FoundAsync = true ;
2502
2503
2503
- return true ;
2504
+ return true ;
2505
+ }
2506
+
2507
+ return false ;
2504
2508
}
2505
2509
2506
2510
std::pair<bool , Stmt *> walkToStmtPre (Stmt *stmt) override {
Original file line number Diff line number Diff line change @@ -1153,17 +1153,14 @@ class ApplyClassifier {
1153
1153
return ShouldNotRecurse;
1154
1154
}
1155
1155
ShouldRecurse_t checkAsyncLet (PatternBindingDecl *patternBinding) {
1156
- // FIXME
1157
- llvm_unreachable (" Test me" );
1158
- // return ShouldRecurse;
1156
+ AsyncKind = ConditionalEffectKind::Always;
1157
+ return ShouldRecurse;
1159
1158
}
1160
1159
ShouldRecurse_t checkThrow (ThrowStmt *E) {
1161
1160
return ShouldRecurse;
1162
1161
}
1163
1162
ShouldRecurse_t checkInterpolatedStringLiteral (InterpolatedStringLiteralExpr *E) {
1164
- // FIXME
1165
- llvm_unreachable (" Test me" );
1166
- // return ShouldRecurse;
1163
+ return ShouldRecurse;
1167
1164
}
1168
1165
1169
1166
ShouldRecurse_t checkIfConfig (IfConfigDecl *D) {
Original file line number Diff line number Diff line change @@ -128,3 +128,22 @@ func invalidReasyncBody(_: () async -> ()) reasync {
128
128
func validReasyncBody( _ fn: ( ) async -> ( ) ) reasync {
129
129
await fn ( )
130
130
}
131
+
132
+ //// String interpolation
133
+
134
+ func reasyncWithAutoclosure2( _: @autoclosure ( ) async -> String ) reasync { }
135
+
136
+ func callReasyncWithAutoclosure3( ) {
137
+ let world = 123
138
+ reasyncWithAutoclosure2 ( " Hello \( world) " )
139
+ }
140
+
141
+ //// async let
142
+
143
+ func callReasyncWithAutoclosure4( _: ( ) async -> ( ) ) reasync {
144
+ await reasyncFunction {
145
+ async let x = 123
146
+
147
+ _ = await x
148
+ }
149
+ }
You can’t perform that action at this time.
0 commit comments