Recent

Author Topic: Zeoslib compile issue  (Read 1016 times)

auRazor

  • New Member
  • *
  • Posts: 17
Zeoslib compile issue
« on: January 22, 2021, 12:59:01 am »
I have just upgraded to FPC 3.2.0 and lazarus 2.0.10 and now getting an issue when attempting to compile zeoslib

Code: Pascal  [Select][+][-]
  1. ZCollections.pas(896,20) Error: Incompatible type for arg no. 2: Got "Class Of IZCollection", expected "TClass"

Has anyone got any experience with this?

This is where the code is failing

Code: Pascal  [Select][+][-]
  1. function TZHashMap.Clone: IZInterface;
  2. var
  3.   HashMap: TZHashMap;
  4. begin
  5.   HashMap := TZHashMap.Create;
  6.   HashMap.FKeys := IZCollection(FKeys.Clone);
  7.   HashMap.FReadOnlyKeys := IZCollection(FReadOnlyKeys.Clone);
  8.   HashMap.FValues := IZCollection(FValues.Clone);
  9.   HashMap.FReadOnlyValues := IZCollection(FReadOnlyValues.Clone);
  10.   Result := HashMap;
  11. end;        

All the IZCollection(FKeys.Clone) fail to compile
Code: Pascal  [Select][+][-]
  1.   IZCollection = interface(IZClonnable)
  2.     ['{51417C87-F992-4CAD-BC53-CF3925DD6E4C}']
  3.  
  4.     function Get(Index: Integer): IZInterface;
  5.     procedure Put(Index: Integer; const Item: IZInterface);
  6.     function IndexOf(const Item: IZInterface): Integer;
  7.     function GetCount: Integer;
  8.     function GetIterator: IZIterator;
  9.  
  10.     function First: IZInterface;
  11.     function Last: IZInterface;
  12.  
  13.     function Add(const Item: IZInterface): Integer;
  14.     procedure Insert(Index: Integer; const Item: IZInterface);
  15.     function Remove(const Item: IZInterface): Integer;
  16.  
  17.     procedure Exchange(Index1, Index2: Integer);
  18.     procedure Delete(Index: Integer);
  19.     procedure Clear;
  20.  
  21.     function Contains(const Item: IZInterface): Boolean;
  22.     function ContainsAll(const Col: IZCollection): Boolean;
  23.     function AddAll(const Col: IZCollection): Boolean;
  24.     function RemoveAll(const Col: IZCollection): Boolean;
  25.  
  26.     property Count: Integer read GetCount;
  27.     property Items[Index: Integer]: IZInterface read Get write Put; default;
  28.   end;
  29.  

auRazor

  • New Member
  • *
  • Posts: 17
Re: Zeoslib compile issue
« Reply #1 on: January 22, 2021, 01:26:46 am »
Compiling it in release mode seems to work but not debug mode

 

TinyPortal © 2005-2018