Avatar
Avatar
zunda
@swift-5.10.1 @swift-5.5.3 @swift-5.4.3 enum Foo { case foo(v1: String) case foo(v2: String) } let foo = Foo.foo(v1: "Hello") print(foo) switch foo { case .foo(v1: let string): print(string) case .foo(v2: let string): print(string) }
swift510 BOT 6/12/2024 7:54 AM
exit status: 1 with <stdin>:11:12: error: tuple pattern element label 'v1' must be 'v2' case .foo(v1: let string): ^