Skip to content

False positive: Object not found in scope in case of "USE, NON_INTRINSIC" #206

Description

@zaikunzhang

First of all, thank you for this great work!

With fortls 1.12.0, I get a false positive about "Object not found in scope". Here is a minimal working example.

!  testls.f90
module kind_mod
implicit none
private
public :: DP
integer, parameter :: DP = kind(0.0D0)
end module kind_mod

program testls
use, non_intrinsic :: kind_mod, only : DP
! If the last line is changed to `use kind_mod, only : DP`, then there is no problem.
implicit none
real(DP) :: x  ! fortls complains that `Object "dp" not found in scope`
x = 0.0_DP
end program testls

fortls complains that Object "dp" not found in scope in the program testls. The complaint will disappear if we replace

use, non_intrinsic :: kind_mod, only : DP

with

use kind_mod, only : DP

Thank you for your attention.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions