Fortls bug with `protected` attribute?

I noticed the protected attribute seems to short-circuit the Fortran Language Server (fortls) when it provides hover text. Take the following example:

module prot
    implicit none
    private

    real, public, dimension(3), protected :: w
    real, public, protected, dimension(3) :: x
    real, protected, public, dimension(3) :: y
    real, public, dimension(3) :: z
end module prot

Notice the different hover text for w, x, and y even though they should have identical attributes. It seems the protected attribute and anything that appears after it are lost.

image

image

image

image

Public and protected are mutually exclusive, is that the error being missed?

Did AI lead me astray? This code originally came from another dev who left my company a few years ago. I asked AI if they were mutually exclusive and it said they were supposed to be used together. The compiler hasn’t complained all these years either.

I am so sorry, my bad. I have just checked in Metcalf, Reid, Cohen and Bader and they say quite clearly that “protected” does not affect visibility and public is required too. Further proof my memory is not… But is does raise an interesting question as to why some of my code works!