Why do I get this error?
/tiOPF/UnitTests/Common/tiDUnitUtils.pas(231,32) Error: type
identifier not allowed here

It works on other enumerated declarations, but not on this one.  I am
pretty sure this code worked before, as I have been using tiOPF under
FPC since December 2005.  I marked the location of the error with a
comment in the code below.


procedure TtiTestCase.CheckObjectState(
 pObjectState: TPerObjectState;
 pData: TtiObject;
 const pMessage: string = '');
begin
 Assert(pData.TestValid, cTIInvalidObjectError);
 Check(pObjectState = pData.ObjectState,
         'ObjectState: Expected <' +
         GetEnumName(TypeInfo(TPerObjectState), Ord(pObjectState)) +
//  error occurs here               ---^---
         '> but got <' +
         pData.ObjectStateAsString +
         '> on ' + pData.ClassName + '. ' + pMessage);
end;


where TPerObjectState is declared as follows:

 TPerObjectState = (
                     posEmpty,
                     posPK,
                     posCreate,
                     posUpdate,
                     posDelete,
                     posDeleted,
                     posClean
                    ) ;


I am using FPC 2.1.1 (r4642) under Linux (kernel 2.6) on Intel P4 processor.

Regards,
 - Graeme -


--
There's no place like 127.0.0.1
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to