Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect underline squiggles location #61

Open
certik opened this issue Dec 28, 2024 · 2 comments
Open

Incorrect underline squiggles location #61

certik opened this issue Dec 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@certik
Copy link
Contributor

certik commented Dec 28, 2024

In SNAP:

image

The location is incorrect.

@certik certik added the bug Something isn't working label Dec 28, 2024
@dylon
Copy link
Collaborator

dylon commented Dec 28, 2024

The range comes directly from lfortran --show-errors. If you check the character range that is underscored, it is from character/column 32 through 38, as the diagnostic shows below:

lfortran --show-errors --continue-compilation -I. snap_main.f90 | jq
{
  "uri": "uri",
  "diagnostics": [
    {
      "source": "lpyth",
      "range": {
        "start": {
          "line": 97,
          "character": 33
        },
        "end": {
          "line": 97,
          "character": 37
        }
      },
      "message": "Symbol 'iproc' from module 'plib_module' shadows 'iproc' in the current scope",
      "severity": 2
    },
    {
      "source": "lpyth",
      "range": {
        "start": {
          "line": 97,
          "character": 40
        },
        "end": {
          "line": 97,
          "character": 43
        }
      },
      "message": "Symbol 'root' from module 'plib_module' shadows 'root' in the current scope",
      "severity": 2
    },
    {
      "source": "lpyth",
      "range": {
        "start": {
          "line": 100,
          "character": 32
        },
        "end": {
          "line": 100,
          "character": 38
        }
      },
      "message": "Symbol 'swp_typ' from module 'control_module' shadows 'swp_typ' in the current scope",
      "severity": 2
    }
  ]
}

@certik
Copy link
Contributor Author

certik commented Dec 29, 2024

Thanks, I made this lfortran/lfortran#5860.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants