On Thu, Mar 1, 2012 at 4:29 AM, leledumbo <leledumbo_c...@yahoo.co.id> wrote:
> That's different case IMHO (In My Humble Observation), I guess it's something
> like this:
>
> {$mode objfpc}
> type
>  TTestClass = class
>    FTile: Integer;
>    property Tile: Integer read FTile write FTile;
>    procedure Test;
>  end;
>
> procedure TTestClass.Test;
> var
>  Tile: Integer;
> begin
> end;
>
> begin
> end.
>
> In this case, the local variable has the same name as one of the class
> properties. This does trigger the "duplicate identifier" error because both
> have the same scope.

Well, for me the local Tile variable should have "preference" because
the scope is local, not "global for class".
Would be equal the use of arguments, IMHO, where we can use an
identifier that already exists in the class.

Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to