Skip to content

Incorrect elaboration of WellFormed clauses for functions #556

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

Closed
jackh726 opened this issue Jul 4, 2020 · 1 comment · Fixed by #625
Closed

Incorrect elaboration of WellFormed clauses for functions #556

jackh726 opened this issue Jul 4, 2020 · 1 comment · Fixed by #625
Labels
bug A bug

Comments

@jackh726
Copy link
Member

jackh726 commented Jul 4, 2020

For Wellformed goals for functions, we push a WellFormed clause for each of the functions arguments here: https://github.com/rust-lang/chalk/blob/master/chalk-solve/src/clauses.rs#L548

This incorrectly handles bound vars. Take the following goal as an example:

WellFormed(for<3> [?0 := Not<'^0.0, ^1.0>])

The following clauses would get pushed:

forall<> WellFormed(for<3> [?0 := Not<'^0.0, ?0>])
forall<> WellFormed(Not<'^`1.0, ?0>)

I don't even think we need to push the Wellformed clauses for the parameters.

@jackh726 jackh726 added the bug A bug label Jul 4, 2020
@jackh726
Copy link
Member Author

For reference, this is what I did in my subtyping branch and that solves it.

It's a bit unclear whether this is exactly what we want, but I'm interested in @nikomatsakis's thoughts. If that's okay, we can mark this as "good first issue"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant