[Lazarus] Annoying code completion failure

Michael Van Canneyt michael at freepascal.org
Sat Nov 2 11:23:32 CET 2019



Hi,

TStrings has a property

     property Values[const Name: string]: string read GetValue write SetValue;

The setter is defined as:

procedure SetValue(const Name, Value: string);

Note that both arguments are 'const'

When adding a new property, and pressing 'CTRL-C', the IDE adds the new
property, but also insists on adding a new SetValue:

procedure SetValue(const Name: string; AValue: string);

Note the missing const on the second parameter.

It does this of course not only for TStrings, but for all such properties.

Michael.


More information about the lazarus mailing list