@@ -591,6 +591,22 @@ class EffectsHandlingWalker : public ASTWalker {
591
591
recurse = asImpl ().checkWithSubstitutionMap (E, UTO->substitutions );
592
592
} else if (auto *EE = dyn_cast<ErasureExpr>(E)) {
593
593
recurse = asImpl ().checkWithConformances (E, EE->getConformances ());
594
+ } else if (auto *OCD = dyn_cast<OtherConstructorDeclRefExpr>(E)) {
595
+ recurse = asImpl ().checkDeclRef (OCD, OCD->getDeclRef (), OCD->getLoc (),
596
+ /* isImplicitlyAsync=*/ false ,
597
+ /* isImplicitlyThrows=*/ false );
598
+ } else if (auto *ME = dyn_cast<MacroExpansionExpr>(E)) {
599
+ recurse = asImpl ().checkDeclRef (ME, ME->getMacroRef (), ME->getLoc (),
600
+ /* isImplicitlyAsync=*/ false ,
601
+ /* isImplicitlyThrows=*/ false );
602
+ } else if (auto *LE = dyn_cast<LiteralExpr>(E)) {
603
+ recurse = asImpl ().checkDeclRef (LE, LE->getInitializer (), LE->getLoc (),
604
+ /* isImplicitlyAsync=*/ false ,
605
+ /* isImplicitlyThrows=*/ false );
606
+ } else if (auto *CE = dyn_cast<CollectionExpr>(E)) {
607
+ recurse = asImpl ().checkDeclRef (CE, CE->getInitializer (), CE->getLoc (),
608
+ /* isImplicitlyAsync=*/ false ,
609
+ /* isImplicitlyThrows=*/ false );
594
610
}
595
611
// Error handling validation (via checkTopLevelEffects) happens after
596
612
// type checking. If an unchecked expression is still around, the code was
@@ -1879,7 +1895,7 @@ class ApplyClassifier {
1879
1895
Self.classifyDeclRef (
1880
1896
declRef, loc, isImplicitlyAsync, isImplicitlyThrows
1881
1897
).onlyThrowing ());
1882
- return ShouldNotRecurse ;
1898
+ return ShouldRecurse ;
1883
1899
}
1884
1900
ShouldRecurse_t checkAsyncLet (PatternBindingDecl *patternBinding) {
1885
1901
return ShouldRecurse;
@@ -2006,7 +2022,7 @@ class ApplyClassifier {
2006
2022
AsyncKind = ConditionalEffectKind::Always;
2007
2023
}
2008
2024
2009
- return ShouldNotRecurse ;
2025
+ return ShouldRecurse ;
2010
2026
}
2011
2027
ShouldRecurse_t checkAsyncLet (PatternBindingDecl *patternBinding) {
2012
2028
AsyncKind = ConditionalEffectKind::Always;
@@ -3634,7 +3650,7 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
3634
3650
declRefExpr->setThrows (throwDest);
3635
3651
}
3636
3652
3637
- return ShouldNotRecurse ;
3653
+ return ShouldRecurse ;
3638
3654
}
3639
3655
3640
3656
ShouldRecurse_t checkAsyncLet (PatternBindingDecl *patternBinding) {
0 commit comments