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

Hover showing incorrect type on nested if payload #1761

Open
adia-dev opened this issue Feb 11, 2024 · 0 comments
Open

Hover showing incorrect type on nested if payload #1761

adia-dev opened this issue Feb 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@adia-dev
Copy link

adia-dev commented Feb 11, 2024

Zig Version

0.12.0-dev.2500+c085c6ecd

Zig Language Server Version

0.12.0-dev.365+a8a83b6

Client / Code Editor / Extensions

NVIM v0.9.4 with Lspconfig

Steps to Reproduce and Observed Behavior

Hover on a nested payload variable to observe the type.
When printing the type of number using @TypeOf I get the correct result.

I have shared a small repo on which you should be able to execute the code and see by yourself:

Otherwise here is a screenshot:
hover

And a gist to the main.zig file: Reproducible Test Case

Expected Behavior

The hover information for number should indicate its type as *NumberLiteralExpression.

Actual Behavior:

The hover information for number incorrectly indicates its type as *UnaryExpression.

Relevant log output

No response

@adia-dev adia-dev added the bug Something isn't working label Feb 11, 2024
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

1 participant