Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update inductive_canonical_cycle test #787

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions tests/test/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,30 +267,38 @@ fn inductive_canonical_cycle() {
program {
trait Trait<T, U> {}

trait IsNotU32 {}
impl IsNotU32 for i32 {}
impl IsNotU32 for i16 {}

impl<T, U> Trait<T, U> for ()
where
(): Trait<U, T>,
T: OtherTrait,
T: IsNotU32,
{}
impl<T> Trait<u32, T> for () {}
}

trait OtherTrait {}
impl OtherTrait for u32 {}
goal {
(): Trait<i32, u32>
} yields {
expect![["Unique"]]
}

goal {
(): Trait<u32, u32>
(): Trait<u32, i32>
} yields {
// FIXME: Should be unique
expect![["No possible solution"]]
expect![["Unique"]]
}

goal {
exists<T, U> {
(): Trait<T, U>
}
} yields {
// FIXME: Should be unique
expect![["No possible solution"]]
} yields[SolverChoice::slg(10, None)] {
expect![["Ambiguous; no inference guidance"]]
} yields[SolverChoice::recursive_default()] {
expect![["Ambiguous; no inference guidance"]]
}
}
}