The following code:
{$MODE DELPHI}
program CharOverload;
uses
SysUtils;
procedure Foo(const aArg: UnicodeString); overload;
begin
WriteLn('WideString: ', aArg);
end;
procedure Foo(c: WideChar); overload;
begin
WriteLn('Char: ', c);
end;
begin
Foo('abc');
end.Fails with current trunk fpc with the following messages
[odysseus:fpc-trunk$] compiler/ppc386 ~/Desktop/test/CharOverload.pp Free Pascal Compiler version 3.1.1 [2018/06/18] for i386 Copyright (c) 1993-2018 by Florian Klaempfl and others Target OS: Darwin for i386
Compiling /Users/djenkins/Desktop/test/CharOverload.pp CharOverload.pp(19,3) Error: Can't determine which overloaded function to call
CharOverload.pp(19,12) Error: Illegal type conversion: "Constant String" to "WideChar"
CharOverload.pp(20,4) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
It fails with same messages with {$MODE OBJFPC}. Is this known. I can enter a Mantis if desired.
Thanks
David Jenkins
