Avatar
Avatar
zunda
@swift-main enum Foo { case foo(String, String, String) } let foo = Foo.foo("String", "String", "String") switch foo { case .foo(let value): print(value.0, value.1, value.2) }
swiftNightly BOT 6/12/2024 9:02 AM
String String String<stdin>:8:12: warning: enum case 'foo' has 3 associated values; matching them as a tuple is deprecated 1 | enum Foo { 2 | case foo(String, String, String) | `- note: 'foo' declared here 3 | } 4 | : 6 | 7 | switch foo { 8 | case .foo(let value): | `- warning: enum case 'foo' has 3 associated values; matching them as a tuple is deprecated 9 | print(value.0, value.1, value.2) 10 | }