Skip to content

[TypeChecker] User interface type while validating keypath dynamic su… #28421

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 1 commit into from
Dec 2, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Nov 21, 2019

…bscript parameter

Avoid unnecessary parameter type substitutions.

@xedin xedin requested a review from CodaFi November 21, 2019 21:30
@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

There's two more callers in this file that can use the interface type.

@xedin xedin force-pushed the switch-dyn-keypath-to-interface-type branch from 36b6246 to 2ee7d31 Compare November 21, 2019 21:41
@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

@CodaFi I've fixed one more usage but I'd like to keep this PR about isValidKeyPathDynamicMemberLookup...

@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

@CodaFi Looks like with getInterfaceType() check for ExpressibleByStringLiteral fails for declarations like subscript<U: ExpressibleByStringLiteral>(dynamicMember member: U) -> T.

@CodaFi
Copy link
Contributor

CodaFi commented Nov 21, 2019

So then isValidStringDynamicMemberLookup does but isValidKeyPathDynamicMemberLookup definitely doesn't.

@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

Sounds good!

…bscript parameter

Avoid unnecessary parameter type substitutions.
@xedin xedin force-pushed the switch-dyn-keypath-to-interface-type branch from 2ee7d31 to b5f89cf Compare November 21, 2019 23:14
@xedin
Copy link
Contributor Author

xedin commented Nov 21, 2019

@swift-ci please smoke test

@xedin xedin merged commit 95708bf into swiftlang:master Dec 2, 2019
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