Skip to content

Commit

Permalink
chore: add regression test for #3051 (#4815)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves #3051

## Summary\*

This issue has been fixed and so I'm added a regression test.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Apr 26, 2024
1 parent 91062db commit a2fb3dc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test_programs/execution_success/regression_3051/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "regression_3051"
type = "bin"
authors = [""]
compiler_version = ">=0.27.0"

[dependencies]
24 changes: 24 additions & 0 deletions test_programs/execution_success/regression_3051/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
trait Foo {
fn foo(self) -> Field;
}

impl Foo for Field {
fn foo(self) -> Field {
self + 1
}
}

trait Bar {
fn bar(self) -> u64;
}

impl Bar for u64 {
fn bar(self) -> u64 {
self + 1
}
}

fn main() {
dep::std::println(1.foo());
dep::std::println(1.bar());
}

0 comments on commit a2fb3dc

Please sign in to comment.