Skip to content

Commit

Permalink
fix defined_trait
Browse files Browse the repository at this point in the history
  • Loading branch information
gzanitti committed Aug 12, 2024
1 parent 41cfd1f commit 1688aed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pil-analyzer/tests/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ fn defined_trait() {
impl Add<int> {
add: |a, b| a + b,
}
let r = Add::add(3, 4);
let r: int = Add::add(3, 4);
";
type_check(input, &[("r", "", "int")]);
}
Expand Down Expand Up @@ -774,12 +774,12 @@ fn traits_and_refs() {
cast: |a| std::convert::fe(a),
}
// let x: int -> fe = |q| match Add::add(q, 2) {
// v => std::convert::fe(v),
// };
let x: int -> fe = |q| match Add::add(q, 2) {
v => std::convert::fe(v),
};
let y: int -> fe = |q| match Add::add(q, 4) {
v => std::convert::fe(v) + Cast::cast(v),
v => x(v) + Cast::cast(v),
};
let r: fe = y(2);
Expand Down

0 comments on commit 1688aed

Please sign in to comment.