Procedural types cannot have helpers
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
(This a an enhancement request)
For example I'd like to generalize using isAssigned
or isNotAssigned
as a properties of everything than is allowed by the assigned()
intrinsic.
This works for pointers, classes, and now interface (thanks BTW) but for now not procedural types, e.g
---
TNotifyEventHelper = type helper for TNotifyEvent
function isNotAssigned: boolean;
function isAssigned: boolean;
end;
---
is refused with
--- Error: Type "&LtPos;procedure variable type of procedure(TObject) of object;Register>" cannot be extended by a type helper ---
Ultimately I'm thinking to generic helpers... also I know there might be limitations. In a perfect world we could declare
---
generic TAssignedHelper<T> = type helper for T
function isNotAssigned: boolean;
function isAssigned: boolean;
end;
---
Mantis conversion info:
- Mantis ID: 37333
- Version: 3.2.0