docs: clarify unsupported operators in operator precedence#9801
Open
atorrers wants to merge 1 commit intostarkware-libs:mainfrom
Open
docs: clarify unsupported operators in operator precedence#9801atorrers wants to merge 1 commit intostarkware-libs:mainfrom
atorrers wants to merge 1 commit intostarkware-libs:mainfrom
Conversation
orizi
requested changes
Mar 30, 2026
Collaborator
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on atorrers).
docs/reference/src/components/cairo/modules/language_constructs/pages/operator-precedence.adoc line 29 at r1 (raw file):
| Assignment | `=` `+=` `-=` `*=` `/=` `%=` `<<=` `>>=` `&=` `^=` `\|=` | Shift and bitwise compound assignment operators are not supported.
split into rows instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarify
operator-precedence.adocby documenting that chained equality (a == b == c) is unsupported and by replacing a vague assignment-table note with an explicit unsupported operator list for shift/bitwise compound assignments (<<=,>>=,&=,^=,|=).Type of change
Please check one:
Why is this change needed?
operator-precedence.adocalready documented unsupported chained comparisons (a < b < c) but did not document unsupported chained equality (a == b == c), while related operator pages already do. The assignment row also used a generic "Second line not yet supported" note instead of explicitly naming unsupported operators. This mismatch can mislead users into unsupported syntax that fails at parse/compile time.What was the behavior or documentation before?
operator-precedence.adoc.What is the behavior or documentation after?
Chained equalitysection with a concrete rewrite pattern:a == b && b == c.<<=,>>=,&=,^=,|=) are not supported.Related issue or discussion (if any)
Additional context
This is a docs-only, low-risk change that aligns this page with existing operator-reference coverage and with current parser-supported assignment operators, reducing avoidable user confusion.
Note
Low Risk
Docs-only changes that clarify unsupported Cairo syntax; no runtime or API behavior is modified.
Overview
Updates
operator-precedence.adocto explicitly document unsupported syntax. It replaces the vague assignment-table note with an explicit list of unsupported shift/bitwise compound assignments (<<=,>>=,&=,^=,|=), and adds a new Chained equality section statinga == b == cis not supported and should be written asa == b && b == c.Written by Cursor Bugbot for commit fed4465. This will update automatically on new commits. Configure here.