Skip to content

Commit 244cf04

Browse files
committed
BUG: first check number of args
1 parent e20e422 commit 244cf04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sphinxfortran/crackfortran.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ def postcrack3(postlist):
19091909
# subblock['procedures'] = {}
19101910
elif kind in ['function', 'subroutine']:
19111911
args = subblock['args']
1912-
if args[0] in ['self', 'this']:
1912+
if len(args) > 0 and args[0] in ['self', 'this']:
19131913
# is a type-bound procedure
19141914
var = {'typespec': 'type_bound_procedure',
19151915
'attrspec': ['type-bound procedure']}

0 commit comments

Comments
 (0)