[fpc-pascal] Verify Method Calls

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jul 4 22:55:19 CEST 2016


On 04/07/16 19:38, tobiasgiesen at gmail.com wrote:
> I would like to use "Verify Method Calls" (-CR), but when I choose it in the Lazarus
> project options under debugging, I get compiler errors such as:
>
> Incompatible type for arg no.2: Got "Class Of IZCollection", expected "TClass".
>
> With Verify Method Calls off, the same code compiles fine.
>
> The offending line is from ZEOS lib, ZCollections.pas:
>
> HashMap.FKeys := IZCollection(FKeys.Clone);
>
> I wonder why it says "arg no.2".

Try compiling with -vh, it may show more info. -CR basically turns all 
object/class typecasts into "as"-like expressions, but in a way that you 
can still pass them to var/out-parameters.

> Is it possible to turn "Verify Method Calls" off via a {$xxx } switch in the
> source code?

No.


Jonas



More information about the fpc-pascal mailing list