mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:39:27 +02:00
* patch by Jan Bruns to solve an issue with the new overloading selection code, resolves #37969
git-svn-id: trunk@47211 -
This commit is contained in:
parent
b51729dac5
commit
dfaee4f04b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -18498,6 +18498,7 @@ tests/webtbs/tw37878.pp svneol=native#text/plain
|
||||
tests/webtbs/tw37926.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw37949.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3796.pp svneol=native#text/plain
|
||||
tests/webtbs/tw37969.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3805.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3814.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3827.pp svneol=native#text/plain
|
||||
|
@ -3691,7 +3691,7 @@ implementation
|
||||
end;
|
||||
{ Setup the first procdef as best, only count it as a result
|
||||
when it is valid }
|
||||
if FCandidateProcs^.invalid then
|
||||
if besthpstart^.invalid then
|
||||
cntpd:=0
|
||||
else
|
||||
cntpd:=1;
|
||||
@ -3701,7 +3701,9 @@ implementation
|
||||
restart := decide_restart(hp,besthpstart);
|
||||
if not restart then
|
||||
begin
|
||||
if not singlevariant then
|
||||
if besthpstart^.invalid then res := 1
|
||||
else if hp^.invalid then res := -1
|
||||
else if not singlevariant then
|
||||
res:=is_better_candidate(hp,besthpstart)
|
||||
else
|
||||
res:=is_better_candidate_single_variant(hp,besthpstart);
|
||||
@ -3721,7 +3723,10 @@ implementation
|
||||
end;
|
||||
{ besthpstart is already set to hp }
|
||||
bestpd:=besthpstart^.data;
|
||||
cntpd:=1;
|
||||
if besthpstart^.invalid then
|
||||
cntpd:=0
|
||||
else
|
||||
cntpd:=1;
|
||||
end
|
||||
else if (res<0) then
|
||||
begin
|
||||
|
11
tests/webtbs/tw37969.pp
Normal file
11
tests/webtbs/tw37969.pp
Normal file
@ -0,0 +1,11 @@
|
||||
{$mode objfpc}
|
||||
program Project1;
|
||||
|
||||
uses
|
||||
sysutils;
|
||||
var
|
||||
aValue: variant;
|
||||
s: String;
|
||||
begin
|
||||
s := Trim( aValue );
|
||||
end.
|
Loading…
Reference in New Issue
Block a user