Ryan Joseph via fpc-pascal <[email protected]> schrieb am Fr., 10. Juli 2020, 12:04:
> > > > On Jul 10, 2020, at 12:31 PM, Sven Barth <[email protected]> > wrote: > > > > A lookup is only necessary if you use e.g. "SomeClass as SomeIntf". > > so if I do: > > DoSomething(c as IFoo); > > then Supports() is called at runtime to return the IFoo interface? That's > the kind of thing I was really curious about, when are runtime checks > performed vs compile time checks. > If you use the "as" or "is" operators it will be runtime checks, otherwise it will be compile time checks. Also to be pedantic: the operators use the lower level API GetInterfaceByStr not Supports (which uses another low level API). Regards, Sven >
_______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
