diff --git a/tests/test/misc.rs b/tests/test/misc.rs index e96e5ef1191..cb65829a601 100644 --- a/tests/test/misc.rs +++ b/tests/test/misc.rs @@ -847,3 +847,34 @@ fn recursive_hang() { } } } + +#[test] +fn coinductive_wrapper() { + test! { + program { + #[coinductive] + trait Foo {} + struct Wrapper {} + + impl Foo for Wrapper> + where + Wrapper: Foo + {} + } + + goal { + exists { + Wrapper: Foo + } + } yields[SolverChoice::slg_default()] { + // FIXME: wrong?? + expect![["Unique; for { substitution [?0 := Wrapper<^0.0>] }"]] + } + } + /* + FIXME: overflows + yields[SolverChoice::recursive_default()] { + expect![[r#"Ambiguous; no inference guidance"#]] + } + */ +}