On Fri, Jan 15, 2010 at 09:00, leledumbo <leledumbo_c...@yahoo.co.id> wrote: > > Ah... I can see it now: > > 711 function TFPGList.IndexOf(const Item: T): Integer; > 712 begin > 713 Result := 0; > 714 {$info TODO: fix inlining to work! InternalItems[Result]^} > 715 while (Result < FCount) and (PT(FList)[Result] <> Item) do > 716 Inc(Result); > 717 if Result = FCount then > 718 Result := -1; > 719 end; > > This is where the = operator is required (<> is derived from = ). > > I continue the discussion in mantis, so that this can be solved (hopefully).
I've attached patch to mantis bug which makes compiler print error about missing operator "TPar" = "TPar". This could, at least, give user some hint about what is wrong. The proper solution for this problem is not simple. Somehow, you will have to make operator = (const A, B: TPar) visible inside FGL unit (because of the way generics are currently implemented), or make compiler think that TPGList is implemented in the place where specialization occurs (so compiler first searches "specialization space", and after that "generic-declaration space"). _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal