Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Sep 4, 2020

…version is invalid

If the right-hand side (destination) of value-to-pointer conversion
is incorrect e.g. base type of member is a hole, let's record
a generic "invalid conversion" failure.

Resolves: rdar://problem/68254165

…version is invalid

If the right-hand side (destination) of value-to-pointer conversion
is incorrect e.g. base type of member is a hole, let's record
a generic "invalid conversion" failure.

Resolves: rdar://problem/68254165
@xedin xedin requested a review from hborla September 4, 2020 22:13
//problem/68254165 - Bad diagnostic when using String init(decodingCString:) with an incorrect pointer type
func rdar68254165(ptr: UnsafeMutablePointer<Int8>) {
_ = String(decodingCString: ptr, as: .utf8) // expected-error {{generic parameter 'Encoding' could not be inferred}}
// expected-error@-1 {{type '_.Type' has no member 'utf8'}}
Copy link
Contributor Author

@xedin xedin Sep 4, 2020

Choose a reason for hiding this comment

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

New HoleType allows us to deal with this issue and avoid producing member diagnostic here. I'm going to implement that in a follow-up PR to separate concerns here...

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2020

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2020

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2020

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2020

@swift-ci please smoke test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2020

@swift-ci please smoke test macOS platform

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Sep 5, 2020

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Sep 5, 2020

Windows failure is caused by #33306

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