mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 12:50:29 +02:00
* initialise mineq before exiting the parameter checking loop for open array
parameters (bug in r28862, mantis #26976) git-svn-id: trunk@28954 -
This commit is contained in:
parent
a46b076cd2
commit
dc4a2a59f7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14109,6 +14109,7 @@ tests/webtbs/tw2678.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2690.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2691.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2696.pp svneol=native#text/plain
|
||||
tests/webtbs/tw26976.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2702.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2703.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2704.pp svneol=native#text/plain
|
||||
|
@ -2780,10 +2780,10 @@ implementation
|
||||
eq:=te_incompatible
|
||||
else
|
||||
eq:=compare_defs_ext(tarrayconstructornode(n).left.resultdef,tarraydef(def_to).elementdef,tarrayconstructornode(n).left.nodetype,convtype,pdoper,cdoptions);
|
||||
if eq=te_incompatible then
|
||||
break;
|
||||
if eq<mineq then
|
||||
mineq:=eq;
|
||||
if eq=te_incompatible then
|
||||
break;
|
||||
n:=tarrayconstructornode(n).right;
|
||||
until not assigned(n);
|
||||
eq:=mineq;
|
||||
|
17
tests/webtbs/tw26976.pp
Normal file
17
tests/webtbs/tw26976.pp
Normal file
@ -0,0 +1,17 @@
|
||||
{ %norun }
|
||||
|
||||
{$MODE OBJFPC}
|
||||
program test;
|
||||
|
||||
type
|
||||
TTest = class end;
|
||||
|
||||
procedure E(Arg1: array of UTF8String);
|
||||
begin end;
|
||||
|
||||
procedure E(Arg1: array of TTest);
|
||||
begin end;
|
||||
|
||||
begin
|
||||
E(['aa']); // Incompatible types: got "Constant String" expected "TTest"
|
||||
end.
|
Loading…
Reference in New Issue
Block a user