mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 07:49:17 +03:00
Make sure to constrain dbgs with existential correctly
This commit is contained in:
parent
2dc19207a3
commit
bd06714fd2
@ -705,7 +705,7 @@ pub fn constrain_expr(
|
||||
expected,
|
||||
);
|
||||
|
||||
constraints.exists_many([], [cond_con, continuation_con])
|
||||
constraints.exists_many([*variable], [cond_con, continuation_con])
|
||||
}
|
||||
|
||||
If {
|
||||
|
@ -8529,4 +8529,23 @@ mod solve_expr {
|
||||
print_can_decls: true
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn constrain_dbg_flex_var() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
polyDbg = \x ->
|
||||
#^^^^^^^{-1}
|
||||
dbg x
|
||||
x
|
||||
|
||||
main = polyDbg ""
|
||||
"#
|
||||
),
|
||||
@"polyDbg : a -[[polyDbg(1)]]-> a"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user