opensubscriber
   Find in this group all groups
 
Unknown more information…

f : fpc-pascal@lists.freepascal.org 1 March 2012 • 4:33PM -0500

Re: [fpc-pascal] Re: Duplicate Identifier
by Noa Shiruba

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi leledumbo,

I also tend to Think it's something like that with non-scoped records or something similar.  (this is mostly non-oop code, but there are record types with members called "tile" in other units that get pulled in...)

However the compiler specifically names other units as the culprit, so who knows.

Thank you,
    Noah silva

On 2012/03/01, at 16:29, leledumbo <leledumbo_cool@yaho...> 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.
>
> --
> View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Re-Duplicate-Identifier-tp5526700p5527107.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@list...
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@list...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.