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

Variable not defined in unreachable code with semantic highlighting on #406

Closed
karthiknadig opened this issue Sep 23, 2020 · 3 comments
Closed
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@karthiknadig
Copy link
Member

Environment data

  • Language Server version: 2020.9.5
  • OS and version: Windows
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9

Expected behaviour

Should not be showing squiggles on expected.

Actual behaviour

image

Logs

XXX

Code Snippet / Additional information

def repro(self):
    expected = "hello"
    if sys.version_info < (3,):
        print(expected)
@karthiknadig
Copy link
Member Author

Disabling sematic highlighting gets rid of the squiggle:
image

@huguesv huguesv added the bug Something isn't working label Sep 24, 2020
@github-actions github-actions bot removed the triage label Sep 24, 2020
@huguesv huguesv self-assigned this Sep 24, 2020
@huguesv huguesv added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Sep 24, 2020
@huguesv
Copy link
Contributor

huguesv commented Sep 24, 2020

I've implemented a fix, and it will be in the next release of Pylance.

@jakebailey
Copy link
Member

This issue has been fixed in version 2020.9.7, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202097-30-september-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants