Skip to content

Commit

Permalink
[lir][test] add external function test
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingerZhu committed Feb 29, 2024
1 parent a97064e commit c97a133
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rura-lir/src/pass/analysis/type_inference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,21 @@ mod test {
err = 0
);
}

#[test]
fn test_external_funcall() {
test_type_inference!(
input = r#"
module typing {
fn length(%0 : str) -> usize;
fn test() -> usize {
%0 = constant "hello" : str;
%1 = call length (%0);
return %1;
}
}
"#,
err = 0
);
}
}

0 comments on commit c97a133

Please sign in to comment.