-
Notifications
You must be signed in to change notification settings - Fork 381
fix(ownership): Clone global arrays #8328
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
Changes from 6 commits
8979692
a56f3c7
0bf3368
0968c93
ab8d1f2
4ddfc19
00dfb02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [package] | ||
| name = "global_array_rc_regression_8259" | ||
| type = "bin" | ||
| authors = [""] | ||
|
|
||
| [dependencies] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| global G_C: [bool; 3] = [true, false, true]; | ||
| fn main(a: bool) -> pub [bool; 3] { | ||
| let b = func_1(a, G_C); | ||
| if a { | ||
| G_C | ||
| } else { | ||
| b | ||
| } | ||
| } | ||
| fn func_1(a: bool, mut b: [bool; 3]) -> [bool; 3] { | ||
| b[1] = a; | ||
| b | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [global_array_rc_regression_8259] Circuit output: Vec([Field(1), Field(0), Field(1)]) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [package] | ||
| name = "global_slice_rc_regression_8259" | ||
| type = "bin" | ||
| authors = [""] | ||
|
|
||
| [dependencies] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| global G_C: [bool] = &[true, false, true]; | ||
| fn main(a: bool) { | ||
| println(func_1(a, G_C)); | ||
vezenovm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| println(G_C); | ||
| } | ||
| fn func_1(a: bool, mut b: [bool]) -> [bool] { | ||
| b[1] = a; | ||
| b | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| &[true, true, true] | ||
| &[true, false, true] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.