[fpc-devel] potential bug, generics vs helpers
Kornel Kisielewicz
kornel.kisielewicz at gmail.com
Fri Jan 27 20:34:58 CET 2012
On Fri, Jan 27, 2012 at 6:37 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Now regarding Kornel's problem: we could(!) change the way the compiler
> works in non-Delphi modes to what is described in the documentation (by
> adding the type symbol's name to the generic's name as well), but this will
> mean that we would have to define how units in Delphi and non-Delphi modes
> can interact here. After that the corresponding code in the compiler can be
> implemented to ensure this.
Okay, after some thoughts about it, changing the implementation to the
way the documentation is written would also be bad, because sometimes
we need to access a generic from another generic, eg:
generic TGMatrix4<T> = record
type TVector4 = specialize TGVector4<T>;
...
end;
Obviously we want that TGMatrix4 to be compatible with any compatible
TGVector2 defined elsewhere... Same problem would be in the case of
implementation of some data structures.
--
regards,
Kornel Kisielewicz
More information about the fpc-devel
mailing list