Michael Van Canneyt wrote:

On Sun, 1 Jan 2006, Vincent Snijders wrote:


Michael Van Canneyt wrote:

On Sun, 1 Jan 2006, Vincent Snijders wrote:



Dale Welch wrote:


in lcl/resources.pp and in lcl/propertystorage.pas
there are published properties which the same identifier name is
then
used
as a passed parameter:   Value, Stream, Data, StoredValue.   See
below.

If someone who is familiar with these files wants to look at it
and
confirm that you did not mean to access the property then the
parameter
could be given a different name.  Or perhaps this is an option on
the
compiler to ignore this?

Use svn version of lazarus or use fpc 2.0.2.

Newer fpc version are stricter in $mode objfpc: they don't allow
parameter
with the same name as properties.


It's more correct to say that the old fpc was not strict enough.
This was always the intention, just the compiler didn't take some cases
into account.

That is exactly what I meant. Stricter now means old version was not strict
enough.


Or didn't restrict at all, implying that it is a 'new' restriction - I just wanted to make the point that it already did some checking, but not enough.
"The compiler does it's job better now" is maybe a more flattering statement ;-)

I won't discuss if this behaviour is better or not, but it is IMO not consistent with the ability to choose any symbolname in a given scope (as long as it is not a reserved word).
IMO params of a method have a different scope than the class itself.

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to