unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, sqldb;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormShow(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
var
Q: tSQLQuery;
begin
Q.Locate('ID', '5', []);
end;
end.
This code gives the message:
unit1.pas(35,21) Note: Call to subroutine "operator :=(const source:Char):Variant;" marked as inline is not inlined
Of course this code is not intended to run - just a small example of the "problem".
Thank you. So it was the conversion to
Variant that is the problem and not the
Locate call itself. That's why I need a precise description of the problem.
That said: for 3.2.x you'll have to help yourself with disabling the hint if necessary, because the operator overload uses the
VariantManager variable that is declared in the
implementation section of the
System unit.
For 3.3.1 the compiler can handle such "local" symbols and thus no warning will be generated anymore in this situation plus the compiler will indeed inline the operator overload.