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

Hovering over a field, when destructuring records, should produce the field type #3847

Open
JosephTLyons opened this issue Nov 18, 2024 · 6 comments

Comments

@JosephTLyons
Copy link

JosephTLyons commented Nov 18, 2024

use ParseData(is_positive, next_index, tokens) <- result.try(parse_data)

I would like to be able to hover over tokens and get its type, but currently, we get the overall ParseData record type on hover:

SCR-20241118-mkiz

Hovering on ParseData should produce ParseData(Bool) and hovering on tokens should produce List(Tokens)

@JosephTLyons JosephTLyons changed the title Hovering over a field, when destructuring values, should produce the field type Hovering over a field, when destructuring records, should produce the field type Nov 18, 2024
@giacomocavalieri
Copy link
Member

I can give this a try!

@GearsDatapacks
Copy link
Member

I was already looking into this, but you can if you want

@giacomocavalieri
Copy link
Member

Oh no please, go ahead!

@GearsDatapacks
Copy link
Member

I should start writing comments when I'm looking into an issue

@GearsDatapacks
Copy link
Member

Ah, I see what the issue is. use expressions get transformed into function calls at analysis time, so we don't have easy access to the information for this pattern, without some hacks. It's probably best to wait until #3824 is merged, so that this is easier to implement.

@giacomocavalieri
Copy link
Member

Ah right, I'll mark it as ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants