Closed calda closed 4 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.20%. Comparing base (
f487996
) to head (adea102
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think maybe this only works by coincidence? The key/value labels happen to match the defaults in Dictionary, but what if different labels had been used instead?
Just checked -- if you reassign the labels, the compiler emits a warning suggesting you not do this:
let dict = ["foo": "bar"]
// ⚠️ warning: tuple conversion from '(key: String, value: String)' to '(a: String, b: String)' mismatches labels
dict.forEach { (header: (a: String, b: String)) in
print(header.a)
print(header.b)
}
So while renaming tuple keys in that way is technically possible, it seems like an anti-pattern that I think is ok for us to not support.
LGTM
This PR fixes #1709.
This code was being parsed incorrectly:
so was unexpectedly converted to:
instead of: