[Lazarus] Code completion: Error: ancestor has same name as class.

Marcos Douglas md at delfire.net
Sun Mar 6 02:57:02 CET 2011


The program below compiles. But if I try to use code completion here
writeln(s.F...
Occurs this error:
test.lpr(8,31) Error: ancestor has same name as class.

program test;

{$mode objfpc}{$H+}

uses SysUtils, Classes;

type
  TStringList = class(Classes.TStringList)
  public
    function Foo: string;
  end;

function TStringList.Foo: string;
begin
  result := 'Foo';
end;

var
  s: TStringList;
begin
  s := TStringList.Create;
  writeln(s.Foo);
  s.Free;
  readln;
end.


Marcos Douglas




More information about the Lazarus mailing list