0

Is there an easy way without passing from a whole switch to get an associated value? I've already read this answer and it seems that (as 2.0 beta) the only solution is create a method that extract it, but maybe in latest version the SWIFT team has improved this functionality.
I'm trying to do something like that:

    switch additionalInfo {
    case _ (let instrumentAddData):
        print("\(instrumentAddData)")
    default:
        print("Default")
Community
  • 1
  • 1
Andrea
  • 26,120
  • 10
  • 85
  • 131

0 Answers0