mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 07:19:27 +02:00
new bug
This commit is contained in:
parent
a15f1c3283
commit
085f7e64c4
39
tests/webtbs/tw3499.pp
Normal file
39
tests/webtbs/tw3499.pp
Normal file
@ -0,0 +1,39 @@
|
||||
{ Source provided for Free Pascal Bug Report 3499 }
|
||||
{ Submitted by "Bart Tierens" on 2005-01-02 }
|
||||
{ e-mail: svg@deds.nl }
|
||||
program test;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
uses SysUtils;
|
||||
|
||||
type
|
||||
TProcedure = procedure of object;
|
||||
Class1 = class
|
||||
public
|
||||
proc: TProcedure;
|
||||
procedure p(const aproc: TProcedure);
|
||||
end;
|
||||
Class2 = class
|
||||
public
|
||||
procedure d();
|
||||
end;
|
||||
|
||||
procedure Class1.p(const aproc: TProcedure);
|
||||
begin
|
||||
proc := aproc;
|
||||
end;
|
||||
|
||||
procedure Class2.d();
|
||||
begin
|
||||
writeLn('procedure called');
|
||||
end;
|
||||
|
||||
var
|
||||
c: Class1;
|
||||
e: Class2;
|
||||
begin
|
||||
c := Class1.create();
|
||||
e := Class2.create();
|
||||
c.p(e.d);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user