* Class(classref) should not be allowed

This commit is contained in:
peter 2002-12-18 16:26:51 +00:00
parent d79fd9f918
commit 2e4fdfd4ec

25
tests/tbf/tb0151.pp Normal file
View File

@ -0,0 +1,25 @@
{ %fail }
{$ifdef fpc}{$mode objfpc}{$endif}
type
TStream = class(TObject)
function Seek(offset:Int64):Int64;
end;
TSeek64 = function(offset:Int64):Int64 of object;
function TStream.Seek(offset:Int64):Int64;
begin
end;
var
s : TStream;
p : TSeek64;
c : TClass;
begin
s:=TStream.Create;
c:=s.Classtype;
{ This is not valid, @c should be used }
p:=@TStream(c).Seek;
end.