Skip to content

Commit

Permalink
Fixes error with interfaces as function arguments
Browse files Browse the repository at this point in the history
Fixes Error message for dummy procedure argument. #200
  • Loading branch information
gnikit committed Dec 12, 2021
1 parent f126078 commit 355f11d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# CHANGELONG

## 1.12.1

### Fixes

* Fixes diagnostic error with interfaces as function arguments
([#200](https://github.com/hansec/fortran-language-server/issues/200))

## 1.12.0

### Improvements
Expand Down
8 changes: 8 additions & 0 deletions fortls/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,14 @@ def resolve_arg_link(self, obj_tree):
if arg == child.name.lower():
ind = i
break
# If an argument is part of an interface block go through the
# block's children i.e. functions and subroutines to see if one matches
elif child.name.lower().startswith("#gen_int"):
for sub_child in child.children:
if arg == sub_child.name:
self.arg_objs[i] = sub_child
break

if ind < 0:
if child.keywords.count(KEYWORD_ID_DICT["intent"]) > 0:
self.missing_args.append(child)
Expand Down

0 comments on commit 355f11d

Please sign in to comment.