Skip to content

Commit

Permalink
Move test somewhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 20, 2024
1 parent 8b6b175 commit 3cbe8d0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 19 additions & 0 deletions compiler/noirc_frontend/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3918,3 +3918,22 @@ fn warns_on_nested_unsafe() {
CompilationError::TypeError(TypeCheckError::NestedUnsafeBlock { .. })
));
}

#[test]
fn mutable_self_call() {
let src = r#"
fn main() {
let mut bar = Bar {};
let _ = bar.bar();
}
struct Bar {}
impl Bar {
fn bar(&mut self) {
let _ = self;
}
}
"#;
assert_no_errors(src);
}
19 changes: 0 additions & 19 deletions compiler/noirc_frontend/src/tests/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,22 +975,3 @@ fn errors_if_multiple_trait_methods_are_in_scope_for_method_call() {
traits.sort();
assert_eq!(traits, vec!["private_mod::Foo", "private_mod::Foo2"]);
}

#[test]
fn mutable_call() {
let src = r#"
fn main() {
let mut bar = Bar {};
let _ = bar.bar();
}
struct Bar {}
impl Bar {
fn bar(&mut self) {
let _ = self;
}
}
"#;
assert_no_errors(src);
}

0 comments on commit 3cbe8d0

Please sign in to comment.