Skip to content

Commit

Permalink
#924 fix issue identified by integ. tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Jan 8, 2024
1 parent 3b3cd72 commit 855e2e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/psyclone/psyir/nodes/codeblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def get_ast_nodes(self):
'''
:returns: the nodes associated with this code block in
the original AST.
:rtype: list[`:py:classfparser.two.Fortran2003.Base`]
:rtype: list[:py:class:`fparser.two.Fortran2003.Base`]
'''
return self._fp2_nodes
Expand Down
9 changes: 9 additions & 0 deletions src/psyclone/psyir/nodes/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ def __str__(self):

def get_routine_definition(self, name):
'''
Searches the Container for the definition of the named routine.
:param str name: the name of the Routine for which to search.
:returns: the PSyIR of the named Routine if found, otherwise None.
:rtype: :py:class:`psyclone.psyir.nodes.Routine` | NoneType
'''
rname = name.lower()
from psyclone.psyir.nodes.routine import Routine
Expand Down Expand Up @@ -204,6 +211,8 @@ def get_routine_definition(self, name):
if child_cntr_sym.wildcard_import:
# Find the definition of the container.
container = self.get_container_definition(child_cntr_sym)
if not container:
continue
result = container.get_routine_definition(rname)
if result:
return result
Expand Down

0 comments on commit 855e2e6

Please sign in to comment.