mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 14:48:18 +02:00

Previously we only autmatically called procvars without parameters in TP/Delphi modes if their result type was equal to the parameter type to which they were passed. Resolves #39748.
19 lines
263 B
ObjectPascal
19 lines
263 B
ObjectPascal
{$mode delphi}
|
|
uses
|
|
sysutils;
|
|
type
|
|
glenum=word;
|
|
TglGetError = function(): GLenum; cdecl;
|
|
|
|
function test: glenum; cdecl;
|
|
begin
|
|
result:=42;
|
|
end;
|
|
|
|
var glgeterror : TGlGeterror;
|
|
begin
|
|
glgeterror:=test;
|
|
if inttostr(glgeterror)<>'42' then
|
|
halt(1);
|
|
end.
|