@@ -280,7 +280,6 @@ DerivedConformance::declareDerivedPropertyGetter(TypeChecker &tc,
280
280
VarDecl *property,
281
281
Type propertyContextType) {
282
282
bool isStatic = property->isStatic ();
283
- bool isFinal = property->isFinal ();
284
283
285
284
auto &C = tc.Context ;
286
285
auto parentDC = property->getDeclContext ();
@@ -298,11 +297,6 @@ DerivedConformance::declareDerivedPropertyGetter(TypeChecker &tc,
298
297
getterDecl->setImplicit ();
299
298
getterDecl->setStatic (isStatic);
300
299
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
-
306
300
// Compute the interface type of the getter.
307
301
if (auto env = parentDC->getGenericEnvironmentOfContext ())
308
302
getterDecl->setGenericEnvironment (env);
@@ -332,11 +326,6 @@ DerivedConformance::declareDerivedProperty(Identifier name,
332
326
propDecl->setInterfaceType (propertyInterfaceType);
333
327
propDecl->setValidationToChecked ();
334
328
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
-
340
329
Pattern *propPat = new (C) NamedPattern (propDecl, /* implicit*/ true );
341
330
propPat->setType (propertyContextType);
342
331
0 commit comments