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

[asl] Type checking problem with constants #961

Open
HadrienRenaud opened this issue Sep 9, 2024 · 0 comments
Open

[asl] Type checking problem with constants #961

HadrienRenaud opened this issue Sep 9, 2024 · 0 comments

Comments

@HadrienRenaud
Copy link
Collaborator

The following test should be allowed:

func test ()
begin
  constant K: integer = 5;
  var bv: bits (K) = Zeros(K);
end

Why?
Even if K is an unbounded integer, its uses should be equivalent as using 5 directly, so it's inlining should happen before the unbounded check.

Plan
Use future work on side-effects to simply ignore accesses to constants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant