How do you get labeled associated values from Mirror children?

No, I wasn't actually sure what you meant, thanks for clarifying.


I simply think that if single element tuples are banned (as they currently are), they shouldn't be in the language.


OK, yes I agree that single element tuples (labeled and unlabeled) should be allowed. Banning them is just an exception that causes confusion (and creates unfortunate situations like the one in the OP).

Allowing them doesn't seem totally impossible:


Since tuples are not the only things in Swift which happen to be written using parentheses, I guess unlabeled single element tuples would have to be written as eg:

let foo = (_: 123)
print(type(of: foo)) // (_: Int)

or

let foo = (123,)
print(type(of: foo)) // (Int,)