-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use annotated type when checking declaration (#4966)
# Description ## Problem\* Resolves #4742 ## Summary\* ## Additional Context ## Documentation\* Check one: - [ ] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [ ] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
5 changed files
with
29 additions
and
2 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
7 changes: 7 additions & 0 deletions
7
test_programs/execution_success/slice_init_with_complex_type/Nargo.toml
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "slice_init_with_complex_type" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.28.0" | ||
|
||
[dependencies] |
Empty file.
17 changes: 17 additions & 0 deletions
17
test_programs/execution_success/slice_init_with_complex_type/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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
struct strct1 { | ||
elem1: Field, | ||
} | ||
|
||
fn main() { | ||
let var1: [[i32; 1]] = [[0]]; | ||
let var2: [[i32; 1]] = var1; | ||
|
||
let var1: [(i32, u8)] = [(1, 2)]; | ||
let var2: [(i32, u8)] = var1; | ||
|
||
let var3: [strct1] = [strct1 { elem1: 1321351 }]; | ||
let var4: [strct1] = var3; | ||
|
||
let var1: [i32; 1] = [0]; | ||
let var2: [[i32; 1]] = [var1]; | ||
} |
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