[PSyIR]: Container.get_routine_psyir() does not support interfaces
The PSyIR has support for GenericInterfaceSymbol s but currently Container.get_routine_psyir() expects a 1:1 mapping between the name it is supplied with and the Routine it returns. In this issue we'll generalise it so that it always returns a list of Routine objects.
I'll also take this opportunity to implement #2585 since that's useful here and it's not a lot of code.
On reflection, I'm not sure that this is a good idea - semantically the idea that we ask a Container for a particular routine and can get back a list of Routines with different names is confusing. The question then is, what do we do if the supplied name corresponds to an interface?
Possibly, we should stick to the current implementation of get_routine_psyir but move the resolve_routine out of ModuleInfo and into Container?
Possibly, we should stick to the current implementation of
get_routine_psyirbut move theresolve_routineout of ModuleInfo and into Container?
Agreed, that sounds like a good idea.
Closing this as Container has resolve_routine and find_routine_psyir