Modify the test to reflect the fact the compiler prefers conversion of ansiString to RawByteString over to UTF8String

git-svn-id: trunk@38781 -
This commit is contained in:
pierre 2018-04-18 10:21:26 +00:00
parent 487e01af79
commit dbc0dd81fd

View File

@ -1,13 +1,18 @@
{ %fail }
procedure p(const S : RawByteString); overload; procedure p(const S : RawByteString); overload;
begin begin
writeln(s,'AnsiString prefers RawByteString');
end; end;
procedure p(const S : UTF8String); overload; procedure p(const S : UTF8String); overload;
begin begin
writeln(s,'AnsiString prefers UTF8String');
{ This is not expected, so generate error }
writeln('Unexpected, changed behavior!');
halt(1);
end; end;
var var
s1 : Ansistring; s1 : Ansistring;
begin begin
s1:='Test: ';
p(s1); p(s1);
end. end.