Type#all_includers

There are too many issues created by me recently, so I’d like to discuss this one here before.

Sometimes there are abstract classes/structs which serve a single purpose – find all its subclasses in compilation time to somehow “register” them. In this case inheritance is useless and composition would be better. The issue is that there is TypeNode#all_subclasses method, but no TypeNode#all_includers.

Could it be implemented please?

1 Like

:ping_pong:

“No, it’s not” is an answer too.

I guess the answer is Yes, it just needs to be done.

2 Likes

@vladfaust https://github.com/crystal-lang/crystal/pull/8133

4 Likes