[Lazarus] How well should Lazarus check method parameters?

Sven Barth pascaldragon at googlemail.com
Fri Feb 24 14:42:08 CET 2012


Am 24.02.2012 13:58 schrieb "Flávio Etrusco" <flavio.etrusco at gmail.com>:
>
> On Fri, Feb 24, 2012 at 10:42 AM, Vincent Snijders
> <vincent.snijders at gmail.com> wrote:
> > Op 24 februari 2012 13:13 heeft Flávio Etrusco
> > <flavio.etrusco at gmail.com> het volgende geschreven:
> >>
> >> I can't see any way to justify this not being catch by the compiler as
> >> an _error_. We should report it in the fpc-devel ML or in mantis.
> >
> > A compiler doesn't read the lfm file.
> >
> > Vincent.
> >
> > --
>
> Oops, I thought I tested it with code, not the designer (and now I see
> that test would've been meaningless anyway). I stand corrected.
> The current RTTI doesn't provide that much detail yet, then only the
> IDE can make that check, right?

Correct.

And AFAIK the object inspector already does not provide methods with
incompatible declarations (though I don't know whether "var", "const" and
"constref" are considered different). So in a current Lazarus you might not
be able to achieve a situation like this, but it will not warn/fail if an
older form contains such an event handler.

(My assumption is not completely verified, so handle wit care)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120224/7981cfea/attachment-0003.html>


More information about the Lazarus mailing list