-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] Remove unneeded uses of TVO_CanBindToInOut #15580
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
[Sema] Remove unneeded uses of TVO_CanBindToInOut #15580
Conversation
@swift-ci please test |
@swift-ci please test source compatibility |
My only concern here is whether diagnostics regress as a result of our now failing to produce a solution for a constraint system as opposed to producing a solution and then emitting a diagnostic after. I suspect we do not have good test coverage for those cases. Can you take a look at that, and add some tests that exercise diagnosing |
I think that is potentially fixable by Fixes (that's probably the only viable way to go). |
I also think it would be very helpful for future us if this was documented somehow... |
Hi @rudkx – I'm not clairvoyant, so if you know of new tests that need to be written, can you please elaborate? Thanks. |
The tests here are particularly sensitive to changes in inout bindings. I'm pleasantly surprised they weren't tripped by these changes. |
Hi @CodaFi – Well… That's what happens when one runs |
How does one reproduce source compatibility failures? Specifically: |
@davezarzycki Looks like it's only |
Super. Out of respect to the tentative "make reviewing mandatory" policy discussion, can somebody please bless this pull request with approval? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks great! We are still trying to figure out what to do about diagnostics here. Let's why for @rudkx to bless it.
I didn't have a specific test case in mind. Just a general concern that when I attempted to remove the flag in |
@davezarzycki @rudkx I'm in favor of this change. If any diagnostics are discovered to have regressed later, we should fix how we diagnose inout. @xedin was looking at that. It's broken right now anyway. |
In #15574, @CodaFi pointed out that @slavapestov added
TVO_CanBindToInOut
to the callers ofcreateTypeVariable
out of an "abundance of caution". This pull request removesTVO_CanBindToInOut
as much as possible, without breaking the validation test suite. If this pull request is broken, then we probably need more tests to be added to the test suite.