Discussion:
[fpc-pascal] Extraneous generic parameters
Ryan Joseph via fpc-pascal
2021-03-15 19:45:39 UTC
Permalink
The TArray<T> generic type is part of the ObjPas unit, so the compiler simply picks that instead of that of your program. ;)
Sneaky but that explains the issue.

Btw since we're on the topic of arrays. Are short strings and static arrays not able to be generics? I tried that and got parser errors.

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/f
Sven Barth via fpc-pascal
2021-03-15 22:40:58 UTC
Permalink
The TArray<T> generic type is part of the ObjPas unit, so the compiler
simply picks that instead of that of your program. ;)
Sneaky but that explains the issue.
It's part of the generic type overloading inherited from Delphi. *shrugs*
Btw since we're on the topic of arrays. Are short strings and static
arrays not able to be generics? I tried that and got parser errors.
That is correct. File, set or pointers are not supported either for
example.

Regards,
Sven
Continue reading on narkive:
Loading...