On Thu, 18 May 2017 17:14:03 +0200 Ondrej Pokorny via Lazarus <lazarus@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. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus