Make sure to constrain dbgs with existential correctly

This commit is contained in:
Ayaz Hafiz 2022-12-14 16:47:27 -06:00
parent 2dc19207a3
commit bd06714fd2
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
2 changed files with 20 additions and 1 deletions

View File

@ -705,7 +705,7 @@ pub fn constrain_expr(
expected, expected,
); );
constraints.exists_many([], [cond_con, continuation_con]) constraints.exists_many([*variable], [cond_con, continuation_con])
} }
If { If {

View File

@ -8529,4 +8529,23 @@ mod solve_expr {
print_can_decls: true 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"
);
}
} }