Skip to content

Commit f196d26

Browse files
committed
Sema: remove more final setters
1 parent 34dc07d commit f196d26

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Sema/DerivedConformances.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ DerivedConformance::declareDerivedPropertyGetter(TypeChecker &tc,
280280
VarDecl *property,
281281
Type propertyContextType) {
282282
bool isStatic = property->isStatic();
283-
bool isFinal = property->isFinal();
284283

285284
auto &C = tc.Context;
286285
auto parentDC = property->getDeclContext();
@@ -298,11 +297,6 @@ DerivedConformance::declareDerivedPropertyGetter(TypeChecker &tc,
298297
getterDecl->setImplicit();
299298
getterDecl->setStatic(isStatic);
300299

301-
// If this is supposed to be a final method, mark it as such.
302-
assert(isFinal || !parentDC->getSelfClassDecl());
303-
if (isFinal && parentDC->getSelfClassDecl() && !getterDecl->isFinal())
304-
getterDecl->getAttrs().add(new (C) FinalAttr(/*IsImplicit=*/true));
305-
306300
// Compute the interface type of the getter.
307301
if (auto env = parentDC->getGenericEnvironmentOfContext())
308302
getterDecl->setGenericEnvironment(env);
@@ -332,11 +326,6 @@ DerivedConformance::declareDerivedProperty(Identifier name,
332326
propDecl->setInterfaceType(propertyInterfaceType);
333327
propDecl->setValidationToChecked();
334328

335-
// If this is supposed to be a final property, mark it as such.
336-
assert(isFinal || !parentDC->getSelfClassDecl());
337-
if (isFinal && parentDC->getSelfClassDecl() && !propDecl->isFinal())
338-
propDecl->getAttrs().add(new (C) FinalAttr(/*IsImplicit=*/true));
339-
340329
Pattern *propPat = new (C) NamedPattern(propDecl, /*implicit*/ true);
341330
propPat->setType(propertyContextType);
342331

0 commit comments

Comments
 (0)