hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
294 stars 57 forks source link

Named associate statement not handled #189

Open jrwrigh opened 3 years ago

jrwrigh commented 3 years ago

Very similar to #72, but with named associate blocks. The commented lower two lines works just fine (as was fixed in #72). The upper uncommented lines do not work with fortls:

program test
implicit none

      testing: associate(c => 1)
      end associate testing
      ! associate(c => a) ! works fine
      ! end associate
end program test

Error message:

Unexpected end of scope at line 6

The above example code does compile successfully with gfortran.

Info about the associate language spec itself:

gnikit commented 2 years ago

Hi @jrwrigh FYI this should now be fixed in the fortls Language Server. There is however a bug where the type of c does not display see https://github.com/gnikit/fortls/issues/62, but at least you should not be getting diagnostic errors.