-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement automatic dereferencing for indexing lvalues (#3083)
- Loading branch information
1 parent
0b5eecf
commit b8d8268
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
5 changes: 4 additions & 1 deletion
5
tooling/nargo_cli/tests/compile_success_empty/auto_deref/src/main.nr
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
|
||
fn main() { | ||
let a = &mut [1, 2, 3]; | ||
let a = &mut &mut &mut [1, 2, 3]; | ||
assert(a[0] == 1); | ||
|
||
a[0] = 4; | ||
assert(a[0] == 4); | ||
} |