On Mon, 11 Jan 2016 17:42:23 +0100
Ondrej Pokorny <laza...@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

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to