[fpc-pascal] Re: Duplicate Identifier

Noa Shiruba shiruba at galapagossoftware.com
Thu Mar 1 09:33:43 CET 2012


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 at 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.
> 
> --
> 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 at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list