-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[ConstraintSystem] Record generic fix if destination of a pointer con… #33809
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
Conversation
…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
| //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'}} |
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.
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...
|
@swift-ci please smoke test |
|
@swift-ci please smoke test macOS platform |
|
@swift-ci please smoke test macOS platform |
|
@swift-ci please smoke test Windows platform |
|
@swift-ci please smoke test macOS platform |
1 similar comment
|
@swift-ci please smoke test macOS platform |
|
Windows failure is caused by #33306 |
…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