All Identifiers

Name Unit Description
TMyClass ok_recursive_ancestor

 

TMyClass ok_recursive_ancestor

Valid Pascal, FPC compiles this (just fix first TMyClass, e.g. to not declare explicit ancestor). Generic and non-generic TMyClass are different types.

TMyInterface ok_recursive_ancestor

Invalid Pascal, such relation is not allowed, FPC correctly reports: Error: Forward declaration of class "TMyInterface" must be resolved here to use the class as ancestor

TMyInterface ok_recursive_ancestor

Valid Pascal, FPC compiles this (just fix first TMyInterface, e.g. to not declare explicit ancestor). Generic and non-generic TMyClass are different types.