summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbf/tw3218.pp
blob: ebf65c87b2448cd29a282037d5e894e508944171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ %fail }

{ Source provided for Free Pascal Bug Report 3218 }
{ Submitted by "Vincent Snijders" on  2004-07-20 }
{ e-mail: vslist@zonnet.nl }
{$mode objfpc}

uses
  classes;

type TAProc = procedure(const s: string; o: TObject);
var AProc: TAProc;
procedure A(const s: string; c: TComponent);
begin
  c.Name := s;
end;

var
  o1: TObject;
begin
  AProc:=@A; //this line should generate an error
  o1 := TObject.Create;
  AProc('',o1);
end.