Skip to content

Commit

Permalink
Merge pull request #68 from ecmwf-ifs/naan-procedure-interface-bug-fix
Browse files Browse the repository at this point in the history
Procedure interface scheduler bug fix
  • Loading branch information
reuterbal authored May 4, 2023
2 parents 69dfbbf + 61137a3 commit c1dd882
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion loki/bulk/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,10 @@ def function_interfaces(self):
names = ()
interfaces = self.routine.interfaces

# Named interfaces defined in the parent module should not be included to remove
# the risk of adding a procedure interface defined in the current scope
if (scope := self.scope) is not None:
interfaces += scope.interfaces
interfaces += as_tuple(i for i in scope.interfaces if not i.spec)

names = tuple(
s.name.lower() for intf in interfaces for s in intf.symbols
Expand Down
9 changes: 9 additions & 0 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,16 @@ def test_scheduler_qualify_names():
use other_mod
use MORE_MOD
implicit none
interface override
module procedure some_random_function
end interface ovveride
contains
function some_random_function
end function
subroutine DRIVER
use YET_another_mod
call routine
Expand Down

0 comments on commit c1dd882

Please sign in to comment.