[Lazarus] Lazarus Release Candidate 1 of 1.8.0

Ondrej Pokorny lazarus at kluug.net
Thu May 18 21:48:10 CEST 2017


On 18.05.2017 17:20, Mattias Gaertner via Lazarus wrote:
> On Thu, 18 May 2017 17:14:03 +0200
> Ondrej Pokorny via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> [...]
>> IMO, we should create a new option for CodeTools to override string
>> result types for Ctrl+Shift+C. It could be both easy to implement and
>> easy to understand:
>>
>> if the first argument is some kind of 8bit-string
>> (RawByteString/AnsiString/String), and the result is an 8bit string as
>> well, use the argument string type as result type.
>>
>> In this case
>>
>> var
>>     S: string;
>> begin
>>     X := ExtractFilePath(S);
>> end;
>>
>> should create
>>
>> var
>>     S, X: string;
>> begin
>>     X := ExtractFilePath(S);
>> end;
>>
>> and not (what is now)
>>
>> var
>>     S: string;
>>     X: RawByteString;
>> begin
>>     X := ExtractFilePath(S);
>> end;
>>
>>
>> A lot of the above issues would never happen.
> True.

Should I enable it by default?

Ondrej


More information about the Lazarus mailing list