<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Am 05.01.2021 um 08:55 schrieb Pascal
Riekenberg via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:1685884094.113673.1609833356963@ox.hosteurope.de">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<div class="default-style"> Since i updated my local fpc trunk
some of my programs do not compile anymore. Version from before
christmas was okay. <br>
</div>
<div class="default-style"> <br>
</div>
<div class="default-style"> The compiler can't find the function
"IfThen(AValue: Boolean; const ATrue: string; const AFalse:
string): string;" of StrUtils. <br>
<br>
</div>
<div class="default-style"> Instead it only seems to see the
functions in Math. <br>
</div>
<div class="default-style"> <br>
</div>
<div class="default-style"> SQLGenerator.pas(294,9) Error:
Incompatible type for arg no. 3: Got "Char", expected "Double" <br>
math.pp(2523,10) Hint: Found declaration: IfThen(Boolean;const
Double;const Double=` 0.00000000000000000000E+0000`):Double; <br>
math.pp(2518,10) Hint: Found declaration: IfThen(Boolean;const
Int64;const Int64=`0`):Int64; <br>
math.pp(2513,10) Hint: Found declaration: IfThen(Boolean;const
LongInt;const LongInt=`0`):LongInt; <br>
SQLGenerator.pas(299,9) Error: Incompatible type for arg no. 3:
Got "Constant String", expected "Double" <br>
math.pp(2523,10) Hint: Found declaration: IfThen(Boolean;const
Double;const Double=` 0.00000000000000000000E+0000`):Double; <br>
math.pp(2518,10) Hint: Found declaration: IfThen(Boolean;const
Int64;const Int64=`0`):Int64; <br>
math.pp(2513,10) Hint: Found declaration: IfThen(Boolean;const
LongInt;const LongInt=`0`):LongInt; <br>
SQLGenerator.pas(305,7) Error: Incompatible type for arg no. 3:
Got "Constant String", expected "Double" <br>
math.pp(2523,10) Hint: Found declaration: IfThen(Boolean;const
Double;const Double=` 0.00000000000000000000E+0000`):Double; <br>
math.pp(2518,10) Hint: Found declaration: IfThen(Boolean;const
Int64;const Int64=`0`):Int64; <br>
math.pp(2513,10) Hint: Found declaration: IfThen(Boolean;const
LongInt;const LongInt=`0`):LongInt; <br>
SQLGenerator.pas(442,60) Error: Incompatible type for arg no. 3:
Got "Constant String", expected "Double" <br>
math.pp(2523,10) Hint: Found declaration: IfThen(Boolean;const
Double;const Double=` 0.00000000000000000000E+0000`):Double; <br>
math.pp(2518,10) Hint: Found declaration: IfThen(Boolean;const
Int64;const Int64=`0`):Int64; <br>
math.pp(2513,10) Hint: Found declaration: IfThen(Boolean;const
LongInt;const LongInt=`0`):LongInt; <br>
</div>
<div class="io-ox-signature">
<p>If i qualify IfThen with "StrUtils." it compiles.<br>
</p>
</div>
</blockquote>
<p>I had the same issue with TAChart yesterday and could only solve
it by qualifying each IfThen with the corresponding unit. It only
happens on 64-bit. I bisected the revisions and found the guilty
one in r48002 by Sven Barth: <br>
</p>
<p>"Delphi does not allow a generic method to be overloaded by a non
generic type of the same name (unlike for generic types and non
generic routines); this is probably done to simplify the
implementation of implicit specializations of generic methods so
we do this as well. For this we change the dummy symbol for
generic routines from a typesym to a procsym ... Note: what Delphi
/does/ allow however is to overload a generic routine with a
generic type... go figure. :/ We currently don't allow that" <br>
</p>
</body>
</html>