Skip to content

[CS] Look at the fn's rvalue type in getCalleeLocator #26869

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 2 commits into from
Aug 27, 2019

Conversation

hamishknight
Copy link
Contributor

Missed this case when implementing #24826, we need to look at the function's rvalue type when deciding whether we have a short-form constructor call. I have also added a couple of assertions to RequirementFailure that should hopefully make it slightly easier to spot cases where we've resolved to the wrong affected decl.

This will make it slightly easier to spot cases where we've resolved
to the wrong affected decl.
This makes sure we correctly resolve to the initialiser decl rather than
an lvalue local variable of a metatype in the included test case.
@hamishknight hamishknight requested a review from xedin August 27, 2019 15:08
@hamishknight
Copy link
Contributor Author

*crosses fingers*

@swift-ci please test

@hamishknight
Copy link
Contributor Author

Darn – I'll leave the honours up to you @xedin :)

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Great!

@xedin
Copy link
Contributor

xedin commented Aug 27, 2019

@swift-ci please smoke test

@xedin xedin merged commit 987e2c6 into swiftlang:master Aug 27, 2019
@hamishknight hamishknight deleted the the-right-value branch August 27, 2019 19:10
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