[Lazarus] Lazarus Release Candidate 1 of 1.8.0

Ondrej Pokorny lazarus at kluug.net
Thu May 18 17:14:03 CEST 2017


On 18.05.2017 17:02, Mattias Gaertner via Lazarus wrote:
> On Thu, 18 May 2017 16:57:40 +0200
> Luca Olivetti via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> [...]
>> Index: components/codetools/ide/codyidentifiersdlg.pas
>> ===================================================================
>> --- components/codetools/ide/codyidentifiersdlg.pas     (revision 54949)
>> +++ components/codetools/ide/codyidentifiersdlg.pas     (working copy)
>> @@ -1366,7 +1366,7 @@
>>      NewY: integer;
>>      NewTopLine: integer;
>>      CurUnit: TUDUnit;
>> -  MainPath: RawByteString;
>> +  MainPath: {$IF FPC_FULLVERSION < 30000} string {$ELSE} RawByteString
>> {$ENDIF};
> It must be string. Fixed.

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.

Ondrej


More information about the Lazarus mailing list