[Lazarus] Codetools and specialize
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Nov 16 23:25:14 CET 2015
On Mon, 16 Nov 2015 09:54:20 -0300
Leonardo M. Ramé <l.rame at griensu.com> wrote:
>
>
> El 16/11/15 a las 09:18, Mattias Gaertner escribió:
> > On Mon, 16 Nov 2015 08:16:18 -0300
> > Leonardo M. Ramé <l.rame at griensu.com> wrote:
> >
> >> Hi, I'm trying to implement a method of an specialized class, but when I
> >> type ctrl+space the IDE shows "Error: Identifier not found: specialize".
> >> But I can compile this project without problems.
> >>
> >> The definition of my class is this:
> >>
> >> TActListStudies = class(specialize TBaseGAction<TDummy>)
> >> public
> >> procedure Post; override;
> >> end;
> >
> > Codetools do not yet support anonymous specialization.
> > See bug report:
> > http://bugs.freepascal.org/view.php?id=27895
> >
> > Can you use below instead?
> >
> > TBaseGActionDummy = specialize TBaseGAction<TDummy>;
> >
> > TActListStudies = class(TBaseGActionDummy)
> > public
> > procedure Post; override;
> > end;
> >
>
> Hmm, when I change that, the same error is raised, this time in the
> definition of TBaseGAction:
>
> generic TBaseGAction<T> = class(specialize TBrookGAction<T>)
This needs anonymous specializations.
I improved Codetools a bit, so that the above case works
better. The generic parameter T is still not handled correctly.
Mattias
More information about the Lazarus
mailing list