Skip to content

Replace some uses of getInput(). #18336

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

Merged
merged 3 commits into from
Jul 29, 2018
Merged

Replace some uses of getInput(). #18336

merged 3 commits into from
Jul 29, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jul 29, 2018

Use getParams() instead.

Also, remove some code from classifyDynamicCast() that was both incorrect and is basically dead as a result of code earlier in the function.

rudkx added 2 commits July 28, 2018 23:00
The archetype tests in the code being removed will never succeed
because there is code earlier in the function testing for any
archetypes in either type, and that path always returns.

The remaining test is broken (it's comparing source input and target
input and then target input to target result rather than comparing the
source input and target input and then source result and target
result), and is just duplicating the test that happens above.

If we really want to do a better test for substitutability we can do
so at a later time. In the meantime, I don't think it makes sense to
leave redundant comparisons and an unreachable return in place.
@rudkx rudkx requested a review from jckarter July 29, 2018 07:25
@rudkx rudkx changed the title [SIL] Replace a use of getInput() in classifyDynamicCast. Replace some uses of getInput(). Jul 29, 2018
@rudkx
Copy link
Contributor Author

rudkx commented Jul 29, 2018

@swift-ci Please smoke test

@rudkx
Copy link
Contributor Author

rudkx commented Jul 29, 2018

@swift-ci Please test source compatibility

@rudkx rudkx requested a review from CodaFi July 29, 2018 07:51
Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@rudkx rudkx merged commit b124154 into swiftlang:master Jul 29, 2018
@rudkx rudkx deleted the function-types branch July 29, 2018 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants