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

Properly handle all kinds of variable in arguments of or (||) #1930

Open
5 tasks
PaulKlint opened this issue Mar 24, 2024 · 0 comments
Open
5 tasks

Properly handle all kinds of variable in arguments of or (||) #1930

PaulKlint opened this issue Mar 24, 2024 · 0 comments
Assignees

Comments

@PaulKlint
Copy link
Member

Describe the bug

Simple variable declarations in or expressions are handled properly: int x := 1 || int x := 2 is ok and does not produce a double declaration error for x.

To Reproduce
The following examples all give a double declaration error for x:

  • value main() = {*int x} := {1,2,3} || {*int x} := {10,20,30};
  • value main() = [+int x] := [1,2,3] || [+int x] := [10,20,30];
  • value main() = [*int x] := [1,2,3] || [*int x] := [10,20,30];
  • value main() = [+int x] := [1,2,3] || [+int x] := [10,20,30];
  • value main() = [int x: 1] := [1] || [int x: 10] := [10];

Expected behavior
All the above examples are acceptable and should not generate an error

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

No branches or pull requests

1 participant