org.sonar.l10n.delphi.rules.community-delphi.ExplicitDefaultPropertyReference.html Maven / Gradle / Ivy
Why is this an issue?
Explicitly referencing array properties marked as default
(e.g. MyObj.Items[0]
) is unnecessarily verbose. It can also be unclear
that it is accessing the same collection as the implicit reference (MyObj[0]
).
How to fix it
Use the array accessor directly on the object:
Baz := Bar.Items[0];
Baz := Bar[0];
Resources
© 2015 - 2024 Weber Informatics LLC | Privacy Policy