{ This is a compile-time bug.
  Any of the following "const" expressions will cause compiler error in
  FPC 1.0.7 (versions dated April 2003 and later ones) and 1.0.10.
  
  I know that always SizeOf(TObject) = SizeOf(Pointer) but it's sometimes
  useful to use SizeOf(TYPE) where TYPE is a macro. In this case,
  SizeOf(TObject) must work. BTW it worked in FPC 1.0.6. }

{ SizeOf(TObject) results in "Error: Illegal expression" }
const D1 = SizeOf(TObject);

type TObj = class(TObject);

{ SizeOf(any class) results in "Error: Illegal expression" }
const D2 = SizeOf(TObj);

var
  O1:TObject;
  O2:TObj;
  
{ SizeOf(TObject instance) results in "Error: Illegal expression" }
const D3 = SizeOf(O1);

{ SizeOf(any class instance) results in "Error: Illegal expression" }
const D4 = SizeOf(O2);

begin
end.
