Commit 2b791a3
feat(checker): gate assignment to immutable bindings
Add an immutability check in check_expr_inner's Binary/Assign arm: an
assignment whose LHS is an Ident bound to a non-mutable symbol now
raises CheckError::ImmutableAssignment. Latent until the parser emits
BinaryOp::Assign (documented in-code); cargo test green (143/0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 394fc09 commit 2b791a3
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1010 | 1038 | | |
1011 | 1039 | | |
1012 | 1040 | | |
| |||
0 commit comments