Skip to content
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

[SR-6027] "cannot express tuple conversion" dealing with IUOs #48584

Closed
lattner mannequin opened this issue Sep 29, 2017 · 1 comment
Closed

[SR-6027] "cannot express tuple conversion" dealing with IUOs #48584

lattner mannequin opened this issue Sep 29, 2017 · 1 comment
Labels
compiler The Swift compiler in itself improvement type checker Area → compiler: Semantic analysis

Comments

@lattner
Copy link
Mannequin

lattner mannequin commented Sep 29, 2017

Previous ID SR-6027
Radar rdar://problem/12340004
Original Reporter @lattner
Type Improvement
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, TypeChecker
Assignee None
Priority Medium

md5: 8b86f0067eb945a6276bd85894a9b4c1

duplicates:

  • SR-2672 Implement tuple conversion

Issue Description:

This function can't compile due to the compiler getting confused about IUOs (the actual code uses a C type instead of Int):
func t(_ vals : UnsafePointer<Int>!...) {
for (idx, elt) in vals.enumerated() {
}
}

error: MyMacPlayground.playground:36:18: error: cannot express tuple conversion '(offset: Int, element: UnsafePointer<Int>!)' to '(Int, UnsafePointer<Int>?)'
for (idx, elt) in vals.enumerated() {
^

@belkadan
Copy link
Contributor

Fun with tuple conversions. Probably not something we consider urgent, since there are workarounds, but eventually something for either @slavapestov or @rudkx.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

1 participant