-
Notifications
You must be signed in to change notification settings - Fork 388
fix: Handle &mut function in defunctionalize
#8665
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8d9f5ac
Add test the compiler crash
aakoshh d776a0b
Fix defunctionalize to handle &mut function
aakoshh 9db4ec8
Check in insta
aakoshh 088fc67
Add unit test
aakoshh 472f96e
Merge branch 'master' into af/8662-fix-defunct-mut-func
aakoshh 8699386
Add expected return to Prover.toml
aakoshh 2b36c83
nargo fmt
aakoshh f27ebae
Check in insta
aakoshh e4a3a42
Replace result with &mut Field
aakoshh 998cb2c
Merge branch 'master' into af/8662-fix-defunct-mut-func
aakoshh d706894
Merge remote-tracking branch 'origin/master' into af/8662-fix-defunct…
aakoshh e59311a
Merge branch 'af/8662-fix-defunct-mut-func' of github.com:noir-lang/n…
aakoshh 642e660
Missed a replacement type
aakoshh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [package] | ||
| name = "regression_8662" | ||
| version = "0.1.0" | ||
| type = "bin" | ||
| authors = [""] | ||
|
|
||
| [dependencies] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| c = true | ||
| return = true |
22 changes: 22 additions & 0 deletions
22
test_programs/execution_success/regression_8662/src/main.nr
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| struct Context { | ||
| f: fn() -> bool, | ||
| } | ||
| fn main(c: bool) -> pub bool { | ||
| let mut ctx = Context { f: bar }; | ||
| if c { | ||
| ctx.f = qux; | ||
| } | ||
| foo(&mut ctx) | ||
| } | ||
|
|
||
| fn foo(ctx: &mut Context) -> bool { | ||
| (ctx.f)() | ||
| } | ||
|
|
||
| fn bar() -> bool { | ||
| false | ||
| } | ||
|
|
||
| fn qux() -> bool { | ||
| true | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
...nargo_cli/tests/snapshots/execution_success/regression_8662/execute__tests__expanded.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...ess/regression_8662/execute__tests__force_brillig_false_inliner_-9223372036854775808.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...hots/execution_success/regression_8662/execute__tests__force_brillig_false_inliner_0.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.