The following results in a crash:
Am I doing something wrong, or is this a bug? Filed as FB9042788.
Code Block swift import Combine let subject = PassthroughSubject<String, Error>() let cancellable = subject.map { _ in Empty<String?, Error>().replaceError(with: nil) } .switchToLatest() .sink { print($0) } receiveValue: { print($0 ?? "<none>") } subject.send("") // EXC_BAD_INSTRUCTION
Am I doing something wrong, or is this a bug? Filed as FB9042788.