mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Return loc_expr from uniq_expr
This commit is contained in:
parent
54ead11f5d
commit
b988fc6e56
@ -68,6 +68,7 @@ pub fn can_expr(expr_str: &str) -> CanExprOut {
|
||||
pub fn uniq_expr(
|
||||
expr_str: &str,
|
||||
) -> (
|
||||
Located<Expr>,
|
||||
Output,
|
||||
Vec<Problem>,
|
||||
Subs,
|
||||
@ -87,6 +88,7 @@ pub fn uniq_expr_with(
|
||||
expr_str: &str,
|
||||
declared_idents: &ImMap<Ident, (Symbol, Region)>,
|
||||
) -> (
|
||||
Located<Expr>,
|
||||
Output,
|
||||
Vec<Problem>,
|
||||
Subs,
|
||||
@ -142,7 +144,9 @@ pub fn uniq_expr_with(
|
||||
|
||||
let subs2 = Subs::new(var_store.into());
|
||||
|
||||
(output, problems, subs2, var, constraint, home, interns)
|
||||
(
|
||||
loc_expr, output, problems, subs2, var, constraint, home, interns,
|
||||
)
|
||||
}
|
||||
|
||||
pub struct CanExprOut {
|
||||
|
@ -17,7 +17,8 @@ mod test_infer_uniq {
|
||||
// HELPERS
|
||||
|
||||
fn infer_eq_help(src: &str) -> (Vec<roc::types::Problem>, String) {
|
||||
let (output, _problems, mut subs, variable, constraint, home, interns) = uniq_expr(src);
|
||||
let (_loc_expr, output, _problems, mut subs, variable, constraint, home, interns) =
|
||||
uniq_expr(src);
|
||||
|
||||
assert_correct_variable_usage(&constraint);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user