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

extends generates non ctrl+clickable constants, causing ctrl+click to lead to the wrong definition #4649

Closed
3 tasks done
JovanGerb opened this issue Jul 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@JovanGerb
Copy link
Contributor

JovanGerb commented Jul 4, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

When using the extends keyword for defining classes, the generated projection function is not ctrl-clickable. This can cause ctrl+clicking on the constant to lead to the definition of a different constant.

Context

I was ctrl+clicking on type class projection functions, and got really confused, because it went to the wrong definition.

Steps to Reproduce

Minimal example:

class A (n : Nat)

class B (n : Nat) extends A n

instance {n : Nat} : B n where

variable [i : B 3]

#check i.toA

#check (inferInstance : B 4).toA

In this code, put the cursor on either i.toA, or (inferInstance : B 4).toA. Then go to the infoview and ctrl+click on .toA.

Expected behavior: [Clear and concise description of what you expect to happen]

ctrl+click on .toA leads to the definition of class B.

Actual behavior: [Clear and concise description of what actually happens]

ctrl+click at i.toA doesn't work.
ctrl+click at (inferInstance : B 4).toA leads to the definition of instance instOfNatNat.

Versions

4.11.0-nightly-2024-07-03

Additional Information

[Additional information, configuration or data that might be necessary to reproduce the issue]

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@JovanGerb JovanGerb added the bug Something isn't working label Jul 4, 2024
@mhuisi
Copy link
Contributor

mhuisi commented Jul 4, 2024

This looks like a duplicate of #3063.

@JovanGerb
Copy link
Contributor Author

You're right, sorry about that.

@mhuisi
Copy link
Contributor

mhuisi commented Jul 4, 2024

Closed for being a duplicate of #3063.

@mhuisi mhuisi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 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

2 participants