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

Track IsConst for == and != on arrays #280

Closed
jfecher opened this issue Jul 15, 2022 · 3 comments · Fixed by #2178
Closed

Track IsConst for == and != on arrays #280

jfecher opened this issue Jul 15, 2022 · 3 comments · Fixed by #2178
Assignees
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented Jul 15, 2022

Currently if the user writes array1 == array2 or array1 != array2 (given both variables are arrays), the result will never be const, even if both arrays have const elements.

In practice, this is only noticeable if the result of this expression is later casted to an integer and used as an array index:

let i = (array1 == array2) as Field;
constrain array1[i] == foo; // error: i is not const
@kevaundray
Copy link
Contributor

@jfecher what is the status of this issue?

@jfecher
Copy link
Contributor Author

jfecher commented Jan 23, 2023

Still open. The issue documents a known but fairly unimportant issue as the code to trigger it is possible but fairly contrived.

@kevaundray kevaundray added the bug Something isn't working label Jul 25, 2023
@kevaundray kevaundray added P-LOW and removed E-LOW labels Jul 25, 2023
@kevaundray
Copy link
Contributor

This also disappears if we remove comptime

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

Successfully merging a pull request may close this issue.

2 participants