On 08/1/13 11:48, Michael Fuchs wrote:
program AbstractTest;
{$MODE ObjFpc}{$H+}

uses Classes;

type
   TAbstractClass = class abstract(TObject)
   end;

var
   MyAbstractClass: TAbstractClass = nil;

begin
   MyAbstractClass := TAbstractClass.Create;
   MyAbstractClass.Free;
end.

'Casting' a class as abstract is curious syntax. What led you to think of that? But obviously the compiler knows it.
As soon as you add an abstract method the compiler will give a warning.

Howard


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to