fpc/tests/webtbs/tw39748.pp
Jonas Maebe e746cf96da Overload selection: call procvars if result is compatible with parameter
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.
2022-09-16 11:21:05 +02:00

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.