[Lazarus] Lazarus trunc does not compile with fpc 2.6.4 Win32
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Jan 11 18:18:31 CET 2016
On Mon, 11 Jan 2016 17:42:23 +0100
Ondrej Pokorny <lazarus at kluug.net> wrote:
>[...]
> finah.inc is loaded twice with different PathStr macro so there are
> effectively 2 overloaded ChangeFileExt.
You are right.
> The issue can be easily reproduced (try to complete X):
>
> function StrFunc(Str: string): string;
> begin
> Result := Str;
> end;
>
> function StrFunc(Str: RawByteString): RawByteString;
> begin
> Result := Str;
> end;
>
> procedure Test;
> var
> R: RawByteString;
> S: string;
> begin
> X := StrFunc(S);
> end;
>
> This is because both string and RawByteString have the same default type
> (AnsiString) in CodeTools.
>[...]
> => CodeTools fail to find the exact matching overload if there is
> another less good (but still acceptable) overload. CodeTools are fine
> when they found one compatible overload, not the best that is actually
> picked up by the compiler.
>
> Are you aware of this bug (or are you aware of an issue report in mantis)?
I'm aware. Codetools have only three states: exact, compatible and
incompatible. But in case of RawByteString and UnicodeString
one "compatible" is not enough.
Mattias
More information about the Lazarus
mailing list