{"action":"created","issue":{"url":"https://api.github.com/repos/hansec/fortran-language-server/issues/18","repository_url":"https://api.github.com/repos/hansec/fortran-language-server","labels_url":"https://api.github.com/repos/hansec/fortran-language-server/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/hansec/fortran-language-server/issues/18/comments","events_url":"https://api.github.com/repos/hansec/fortran-language-server/issues/18/events","html_url":"https://github.com/hansec/fortran-language-server/issues/18","id":325678309,"node_id":"MDU6SXNzdWUzMjU2NzgzMDk=","number":18,"title":"Handling of generic procedure interfaces","user":{"login":"unpairedbracket","id":543022,"node_id":"MDQ6VXNlcjU0MzAyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/543022?v=4","gravatar_id":"","url":"https://api.github.com/users/unpairedbracket","html_url":"https://github.com/unpairedbracket","followers_url":"https://api.github.com/users/unpairedbracket/followers","following_url":"https://api.github.com/users/unpairedbracket/following{/other_user}","gists_url":"https://api.github.com/users/unpairedbracket/gists{/gist_id}","starred_url":"https://api.github.com/users/unpairedbracket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unpairedbracket/subscriptions","organizations_url":"https://api.github.com/users/unpairedbracket/orgs","repos_url":"https://api.github.com/users/unpairedbracket/repos","events_url":"https://api.github.com/users/unpairedbracket/events{/privacy}","received_events_url":"https://api.github.com/users/unpairedbracket/received_events","type":"User","site_admin":false},"labels":[{"id":725317747,"node_id":"MDU6TGFiZWw3MjUzMTc3NDc=","url":"https://api.github.com/repos/hansec/fortran-language-server/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-23T12:15:27Z","updated_at":"2018-10-12T08:37:26Z","closed_at":null,"author_association":"NONE","body":"When declaring a generic procedure interface, the generic interface having the same name as one of the contained procedures can trigger a `Variable declared twice in scope` error from `fortls`. I thought this may just be incorrect fortran (it definitely seems bad and confusing) but `gfortran -c test.f03` compiles without errors and doesn't complain even with `-Wall` specified (`crayftn` also has no issues), so I think it must be acceptable. Not a massive issue as it doesn't cause parsing to fail, but detecting this specific case and demoting to a warning might be useful for agreement with the compiler.\r\n\r\n```fortran\r\nmodule m_test\r\n\r\ninterface test_proc\r\n    module procedure test_proc\r\nend interface test_proc\r\n\r\ncontains\r\n\r\nsubroutine test_proc( )\r\nend subroutine test_proc\r\n\r\nend module m_test\r\n```"},"comment":{"url":"https://api.github.com/repos/hansec/fortran-language-server/issues/comments/429249954","html_url":"https://github.com/hansec/fortran-language-server/issues/18#issuecomment-429249954","issue_url":"https://api.github.com/repos/hansec/fortran-language-server/issues/18","id":429249954,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTI0OTk1NA==","user":{"login":"PaulXiCao","id":25491255,"node_id":"MDQ6VXNlcjI1NDkxMjU1","avatar_url":"https://avatars0.githubusercontent.com/u/25491255?v=4","gravatar_id":"","url":"https://api.github.com/users/PaulXiCao","html_url":"https://github.com/PaulXiCao","followers_url":"https://api.github.com/users/PaulXiCao/followers","following_url":"https://api.github.com/users/PaulXiCao/following{/other_user}","gists_url":"https://api.github.com/users/PaulXiCao/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulXiCao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulXiCao/subscriptions","organizations_url":"https://api.github.com/users/PaulXiCao/orgs","repos_url":"https://api.github.com/users/PaulXiCao/repos","events_url":"https://api.github.com/users/PaulXiCao/events{/privacy}","received_events_url":"https://api.github.com/users/PaulXiCao/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T08:37:26Z","updated_at":"2018-10-12T08:37:26Z","author_association":"NONE","body":"I came along the same error and found some more info.\r\n\r\nThe interface name can even be different and the error message will still be thrown but only if one uses ``procedure test_proc`` instead of ``module procedure test_proc``.\r\n\r\nIn short: This will throw an error\r\n```fortran\r\nmodule m_test\r\n\r\ninterface operator(==)\r\n  procedure test_proc\r\nend interface operator(==)\r\n\r\ncontains\r\n\r\nsubroutine test_proc( )\r\nend subroutine test_proc\r\n\r\nend module m_test\r\n```\r\nwhereas this runs smoothly\r\n```fortran\r\nmodule m_test\r\n\r\ninterface operator(==)\r\n  module procedure test_proc\r\nend interface operator(==)\r\n\r\ncontains\r\n\r\nsubroutine test_proc( )\r\nend subroutine test_proc\r\n\r\nend module m_test\r\n```"}}
{"actor":{"display_login":"PaulXiCao"}}