@@ -3382,6 +3382,10 @@ end;
function _LookupVtableInfoEx(AGInterface: TDefaultGenericInterface; ATypeInfo: PTypeInfo; ASize: SizeInt;
AFactory: THashFactoryClass): Pointer;
begin
+ if ATypeInfo^.Kind in TComparerService.UseBinaryMethods then begin
+ System.Error(reInvalidCast);
+ Exit(Nil);
+ end;
case AGInterface of
giComparer:
Exit(