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

Allow for loops over non-comptime ranges in unconstrained functions #1049

Closed
1 task
jfecher opened this issue Mar 28, 2023 · 0 comments · Fixed by #1053
Closed
1 task

Allow for loops over non-comptime ranges in unconstrained functions #1049

jfecher opened this issue Mar 28, 2023 · 0 comments · Fixed by #1053
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented Mar 28, 2023

Problem

The purpose of unconstrained functions is to allow non-deterministic features, most notably arrays of unknown (at compile-time) length and loops over unknown bounds. Yet, this is currently disallowed by the type checker.

Proposed solution

Relax the comptime Field check in the typechecker for for loop ranges to just Field if we are currently inside an unconstrained function.

Alternatives considered

No response

Additional context

No response

Submission Checklist

  • Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
@jfecher jfecher added the enhancement New feature or request label Mar 28, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Mar 28, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant