I want capture the associated value with enum case in if statement, here is my code:
enum TestEnum: Equatable {
case a, b(value: String)
}
func f35() {
let my: TestEnum = TestEnum.b(value: "Hello")
if my == .b(value: let string) {
print(string)
}
}
Xcode does not help me to solve the issue.