-
Notifications
You must be signed in to change notification settings - Fork 695
fix(semantic): incorrect diagnostics for var redefinition in patterns #8591
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
fix(semantic): incorrect diagnostics for var redefinition in patterns #8591
Conversation
giladchase
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion
-- commits line 2 at r2:
Added this commit before the fix to demonstrate the previous, incorrect diagnostics.
I'm BLOCKING to remind myself to squash it before merging.
Code quote:
- 73f5bd7: fix(semantic): incorrect diagnostics for var redefinition in patterns
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 1 of 2 files at r1, 2 of 4 files at r2.
Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @giladchase and @TomerStarkware)
Previously, giladchase wrote…
Added this commit before the fix to demonstrate the previous, incorrect diagnostics.
I'm BLOCKING to remind myself to squash it before merging.
PR adding failing tests is fine.
crates/cairo-lang-semantic/src/expr/test_data/pattern line 319 at r1 (raw file):
error: Missing variable in pattern. --> lib.cairo:3:9 (a, a) => a,
is this caused by the duplication - or by the usage - unclear from the test.
Code quote:
(a, a) => a,
3f2fede to
829cbf3
Compare
8467b32 to
bc645d4
Compare
giladchase
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @orizi and @TomerStarkware)
crates/cairo-lang-semantic/src/expr/test_data/pattern line 319 at r1 (raw file):
Previously, orizi wrote…
is this caused by the duplication - or by the usage - unclear from the test.
Right, removed unnecessary stuff to clarify.
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 4 of 4 files at r3, 4 of 4 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
TomerStarkware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomerStarkware reviewed 1 of 4 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @giladchase)
Either no diagnostics was printed, or an incorrect diagnostic "Missing variable in pattern." was printed.
bc645d4 to
5c3054c
Compare

fix(semantic): incorrect diagnostics for var redefinition in patterns
Either no diagnostics was printed, or an incorrect diagnostic "Missing variable in pattern."
was printed.
fix(semantic): add diagnostic for duplicate var names in pattern