Skip to content

Constants in arrays are not resolved yet #7432

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

Closed
CryZe opened this issue Jan 25, 2021 · 4 comments
Closed

Constants in arrays are not resolved yet #7432

CryZe opened this issue Jan 25, 2021 · 4 comments
Labels
A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now

Comments

@CryZe
Copy link
Contributor

CryZe commented Jan 25, 2021

Const generics highlighting is still very new, so this is kinda expected to not really work fully yet. One case I've noticed are constants in arrays:

https://i.imgur.com/9633wVv.png

Neither const generics nor normal constants are resolved (unresolvedReference / brown color).

@Veykril Veykril added A-ty type system / type inference / traits / method resolution E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now and removed A-ty type system / type inference / traits / method resolution E-unknown It's unclear if the issue is E-hard or E-easy without digging in labels Jan 25, 2021
@Veykril
Copy link
Member

Veykril commented Jan 25, 2021

The problem here is that we don't lower const param expressions yet(regarding arrays we actually just discard the length expression entirely), so this case here also doesn't properly resolve, notice the const param of the return type not being highlighted:
image

The only reason why it works for simple const params that are just a path is that they are actually parsed as type args instead.

Edit: marking as unactionable as we first have to figure out how to lower expressions in types.

@Veykril Veykril added S-unactionable Issue requires feedback, design decisions or is blocked on other work and removed S-actionable Someone could pick this issue up and work on it right now labels Jan 25, 2021
@Veykril
Copy link
Member

Veykril commented Jan 25, 2021

Blocked on #7434

@Veykril Veykril added the A-ty type system / type inference / traits / method resolution label Nov 22, 2021
@flodiebold flodiebold added S-actionable Someone could pick this issue up and work on it right now and removed S-unactionable Issue requires feedback, design decisions or is blocked on other work labels Apr 6, 2022
@Veykril
Copy link
Member

Veykril commented Apr 6, 2022

With #11915 we should mostly resolve the paths in that position for IDE purposes (opposed to type checking and such)

@lnicola
Copy link
Member

lnicola commented Aug 29, 2024

The original examples are now working, let's close this:

image

@lnicola lnicola closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

4 participants