summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbf/tw3395a.pp
blob: 48684f53e10efc7cc6082707d84e684fd6337bc2 (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
25
26
27
28
{ %fail }

{$mode delphi}

type
   texec1 = class
     protected
       procedure execute;
     public
       constructor create;
   end;

   procedure t(p: pointer);
     begin
     end;

   constructor texec1.Create;
     begin
       // This should give an invalid typecast, because a methodpointer are 2 pointers
       t(pointer(execute));
     end;

   procedure texec1.execute;
     begin
     end;

begin
end.