[fpc-pascal] Re: Duplicate Identifier

leledumbo leledumbo_cool at yahoo.co.id
Thu Mar 1 08:29:00 CET 2012


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.



More information about the fpc-pascal mailing list