@@ -1156,47 +1156,6 @@ Expr *DefaultArgumentExprRequest::evaluate(Evaluator &evaluator,
11561156 return initExpr;
11571157}
11581158
1159- ActorIsolation
1160- DefaultInitializerIsolation::evaluate (Evaluator &evaluator,
1161- VarDecl *var) const {
1162- if (var->isInvalid ())
1163- return ActorIsolation::forUnspecified ();
1164-
1165- Initializer *dc = nullptr ;
1166- Expr *initExpr = nullptr ;
1167-
1168- if (auto *pbd = var->getParentPatternBinding ()) {
1169- if (!var->isParentInitialized ())
1170- return ActorIsolation::forUnspecified ();
1171-
1172- auto i = pbd->getPatternEntryIndexForVarDecl (var);
1173- dc = cast<Initializer>(pbd->getInitContext (i));
1174- initExpr = var->getParentInitializer ();
1175- } else if (auto *param = dyn_cast<ParamDecl>(var)) {
1176- // If this parameter corresponds to a stored property for a
1177- // memberwise initializer, the default argument is the default
1178- // initializer expression.
1179- if (auto *property = param->getStoredProperty ()) {
1180- // FIXME: Force computation of property wrapper initializers.
1181- if (auto *wrapped = property->getOriginalWrappedProperty ())
1182- (void )property->getPropertyWrapperInitializerInfo ();
1183-
1184- return property->getInitializerIsolation ();
1185- }
1186-
1187- if (!param->hasDefaultExpr ())
1188- return ActorIsolation::forUnspecified ();
1189-
1190- dc = param->getDefaultArgumentInitContext ();
1191- initExpr = param->getTypeCheckedDefaultExpr ();
1192- }
1193-
1194- if (!dc || !initExpr)
1195- return ActorIsolation::forUnspecified ();
1196-
1197- return computeRequiredIsolation (dc, initExpr);
1198- }
1199-
12001159Type DefaultArgumentTypeRequest::evaluate (Evaluator &evaluator,
12011160 ParamDecl *param) const {
12021161 if (auto *expr = param->getTypeCheckedDefaultExpr ()) {
@@ -2507,11 +2466,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
25072466 PBD->getInitContext (i));
25082467 if (initContext) {
25092468 TypeChecker::contextualizeInitializer (initContext, init);
2510- if (auto *singleVar = PBD->getSingleVar ()) {
2511- (void )singleVar->getInitializerIsolation ();
2512- } else {
2513- computeRequiredIsolation (initContext, init);
2514- }
2469+ (void )PBD->getInitializerIsolation (i);
25152470 TypeChecker::checkInitializerEffects (initContext, init);
25162471 }
25172472 }
0 commit comments