-
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: Methods called after being passed through a generic type were no…
…t being detected (#1785) * add follow-bindings method * add regression test * delete contents of Prover.toml * chain call onto check_expression * use underscore
- Loading branch information
1 parent
4293b15
commit e560cd2
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
crates/nargo_cli/tests/test_data_ssa_refactor/regression_method_cannot_be_found/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,5 @@ | ||
[package] | ||
authors = [""] | ||
compiler_version = "0.1" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
crates/nargo_cli/tests/test_data_ssa_refactor/regression_method_cannot_be_found/Prover.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 @@ | ||
|
23 changes: 23 additions & 0 deletions
23
crates/nargo_cli/tests/test_data_ssa_refactor/regression_method_cannot_be_found/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,23 @@ | ||
use dep::std; | ||
struct Item { | ||
id: Field, | ||
} | ||
|
||
impl Item { | ||
fn log(self) { | ||
let id = self.id; | ||
std::println(id); | ||
} | ||
} | ||
|
||
fn create<V>(something: V) -> V { | ||
something | ||
} | ||
|
||
fn main() { | ||
let a = Item { id: 1 }; | ||
let b = create(a); | ||
let _id = b.id; | ||
// Regression for: cannot find this method | ||
b.log(); | ||
} |
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