* extra test for tw3395

This commit is contained in:
peter 2004-11-29 16:05:54 +00:00
parent 59052a64b9
commit e2c6259fcf
2 changed files with 29 additions and 29 deletions

29
tests/webtbf/tw3395a.pp Normal file
View File

@ -0,0 +1,29 @@
{ %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.

View File

@ -1,29 +0,0 @@
program bug3395;
{$MODE DELPHI}
{$THREADING ON}
type
texec1 = class
protected
procedure execute;
public
constructor create;
end;
procedure t(p: pointer);
begin
end;
constructor texec1.Create;
begin
t(@execute);
end;
procedure texec1.execute;
begin
end;
begin
end.