* 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:
Jonas Maebe 2014-10-31 20:45:54 +00:00
parent a46b076cd2
commit dc4a2a59f7
3 changed files with 20 additions and 2 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.