Skip to content

Commit 58091b6

Browse files
committed
Clarify behaviour of range expressions
1 parent 9daec61 commit 58091b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

text/0000-destructuring-assignment.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,14 @@ context:
243243
- Range patterns.
244244
- Or patterns.
245245

246+
Therefore, literals, bitwise OR, and range expressions (`..`, `..=`) are not permitted on the
247+
left-hand side of a destructuring assignment.
248+
246249
## Compound destructuring assignment
247250

248251
We forbid destructuring compound assignment, i.e. destructuring for operators like `+=`, `*=` and so
249-
on. This is both for the sake of simplicity and since there are relevant design questions that do not have obvious answers,
250-
e.g. how this could interact with custom implementations of the operators.
252+
on. This is both for the sake of simplicity and since there are relevant design questions that do
253+
not have obvious answers, e.g. how this could interact with custom implementations of the operators.
251254

252255
## Order-of-assignment
253256

0 commit comments

Comments
 (0)