[lazarus] Compiler bug tracking...
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Jun 28 03:29:30 EDT 2003
On 28 Jun 2003 01:45:43 -0600
Tom Lisjac <netdxr at adelphia.net> wrote:
>
> > You can always report them under 1.0.6, most times the bug is also
> > present in that release
>
> Thanks. On second thought, I'm not sure if the problem I'm seeing is a
> bug or a compiler implementation issue. The Delphi compiler resolves
> call references to a declared function type and variable such as:
>
> Type
> TickCallFunc = function:Int64;
>
> SomeClass = Class
> FTicks:TickCallFunc;
> end;
>
> FTicks:=@SomeInt64Func;
>
> Procedure LocalProc;
> Var LocalVar:Int64;
> Begin
> LocalVar:=FTicks;
>
> In FPC, the compiler quits at the assignment with a type incompatibility
> between TickCallFunc and int64. Does FPC support this syntax?
Yes, in Delphi mode it allows such ambigious statements.
In objfpc mode you have to write unambigious. That means, you dont want the
variable FTicks, you want to call the function. So, you have to write
LocalVar:=FTicks();
Mattias
More information about the Lazarus
mailing list