You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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() {
^
The text was updated successfully, but these errors were encountered:
Fun with tuple conversions. Probably not something we consider urgent, since there are workarounds, but eventually something for either @slavapestov or @rudkx.
Additional Detail from JIRA
md5: 8b86f0067eb945a6276bd85894a9b4c1
duplicates:
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() {
^
The text was updated successfully, but these errors were encountered: