Back

LL067

Long inheritance chain

Object Pascal — Delphi & Free Pascal
Info
Design

Deep hierarchies via TCustom-prefixed ancestors increase coupling and fragility

deep hierarchies via TCustom-prefixed ancestors increase coupling and fragility.

Why this severity

deep hierarchies via TCustom-prefixed ancestors increase coupling and fragility.


Known false positives

framework-mandated inheritance such as custom VCL controls.

Remediation example

type
  TMyPanel = class(TPanel)
  // prefer direct ancestor over TCustomPanel
  end;

Reconnecting… Connection lost. Reload