mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00
* prefer "any array" -> "open array" over "single element" -> "open array"
conversions, instead failing to choose the best overload (Delphi-compatible) git-svn-id: trunk@17800 -
This commit is contained in:
parent
e490fb1d9d
commit
19fb48dfa9
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9112,6 +9112,7 @@ tests/tbs/tb0572.pp svneol=native#text/plain
|
||||
tests/tbs/tb0573.pp svneol=native#text/plain
|
||||
tests/tbs/tb0574.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0575.pp svneol=native#text/plain
|
||||
tests/tbs/tb0576.pp svneol=native#text/plain
|
||||
tests/tbs/tb205.pp svneol=native#text/plain
|
||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||
|
@ -664,7 +664,9 @@ implementation
|
||||
equal_defs(def_from,tarraydef(def_to).elementdef) then
|
||||
begin
|
||||
doconv:=tc_equal;
|
||||
eq:=te_convert_l1;
|
||||
{ also update in htypechk.pas/var_para_allowed if changed
|
||||
here }
|
||||
eq:=te_convert_l3;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
@ -1609,7 +1609,7 @@ implementation
|
||||
eq:=te_convert_l2
|
||||
else
|
||||
if equal_defs(def_from,tarraydef(def_to).elementdef) then
|
||||
eq:=te_convert_l2;
|
||||
eq:=te_convert_l3;
|
||||
end;
|
||||
end;
|
||||
pointerdef :
|
||||
|
20
tests/tbs/tb0576.pp
Normal file
20
tests/tbs/tb0576.pp
Normal file
@ -0,0 +1,20 @@
|
||||
{ %norun }
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
type ByteArray = array of byte;
|
||||
|
||||
procedure ZeroMemory(var X: array of byte; StartIndex, Count: integer); overload;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure ZeroMemory(var X: array of ByteArray; StartIndex, Count: integer); overload;
|
||||
begin
|
||||
end;
|
||||
|
||||
var
|
||||
buffer: array of byte;
|
||||
begin
|
||||
ZeroMemory(Buffer, 0, Length(Buffer));
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user