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 hover annotations #1326

Closed
p-offtermatt opened this issue Jan 9, 2024 · 3 comments
Closed

Incorrect hover annotations #1326

p-offtermatt opened this issue Jan 9, 2024 · 3 comments
Labels
bug Something isn't working typechecker Type checker for Quint UX impacts or improves user experience

Comments

@p-offtermatt
Copy link
Member

Take this spec:
https://github.com/cosmos/interchain-security/blob/214f6e5c25346b9d3287be8337201f2d15ba538a/tests/mbt/model/ccv.qnt#L337

In particular, this function:

    pure def AppendConsumerAddrToPrune(currentState: ProtocolState, oldConsAddr: ConsumerAddr): ProtocolState = {
        pure val vscId = currentState.providerState.runningVscId
        pure val consumerAddrsToPrune = currentState.providerState.consumerAddrsToPrune
        pure val prevConsAddr = consumerAddrsToPrune.get(oldConsAddr).getOrElse(vscId, [])

       pure val newConsAddrsToPrune = consumerAddrsToPrune

       currentState
    }

when I hover over consumerAddrsToPrune, I get this info:
image
which is not very useful - I want to find the type of consumerAddrsToPrune, which is defined like this:

    type ProviderState =
        {
            [...]
            consumerAddrsToPrune: Chain -> VscId -> List[ConsumerAddr],
        }

The field curiously also doesn't show up when I hover over providerState:

image

It seems this is only broken in this particular function, not everywhere. See how I think it should look, hovering over a providerState somewhere else (red circle for emphasis):
image

Not sure I'm missing something subtle, or this is a genuine bug.

% quint --version
0.18.0
@p-offtermatt p-offtermatt added the bug Something isn't working label Jan 9, 2024
@p-offtermatt p-offtermatt changed the title Broken hover annotations Incorrect hover annotations Jan 9, 2024
@shonfeder
Copy link
Contributor

shonfeder commented Jan 9, 2024

I suspect this may just be a symptom of #1167. WDYT @bugarela ?

@bugarela
Copy link
Collaborator

bugarela commented Jan 9, 2024

That issue is more specific, I believe, to nested tuples. I think this is more related to #1013, since currently we don't use the type annotation information "as much" as we should. And there is something going wrong in reconciling inferred types with annotated ones, causing things similar to this hovering issue iirc.

@shonfeder shonfeder added UX impacts or improves user experience typechecker Type checker for Quint labels Jan 9, 2024
@bugarela
Copy link
Collaborator

This seems to have been fixed! Likely when we fixed #1177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typechecker Type checker for Quint UX impacts or improves user experience
Projects
None yet
Development

No branches or pull requests

3 participants