I saw a code example on the web that labels the types of associated values in an enum declaration, and I immediately thought it wouldn't compile because this feature isn't mentioned in the Swift 5.1 guide. But it does compile! For example:
case failure(code: Int, error: Error)
I did find a discussion about [SE-0155][Discuss] the role of labels in enum case patterns, but didn't read the entire thread.
So what's going on? We should steer clear of labelling associated types? Why does the code compile, and does anyone know what the future might hold for this feature?