Skip to content

Instantly share code, notes, and snippets.

@niw
Created February 25, 2020 22:53
Show Gist options
  • Save niw/0e68bf86fa8ad0881a8fc9f7dd7c2b03 to your computer and use it in GitHub Desktop.
Save niw/0e68bf86fa8ad0881a8fc9f7dd7c2b03 to your computer and use it in GitHub Desktop.
Combine can't be weakly linked on Xcode 11.3
// Run `swiftc -target x86_64-apple-macosx10.14 a.swift && nm -mg ./a`
// We will see non-weak symbol from Combine:
// `(extension in Combine):Combine.Subject< where A.Output == ()>.send() -> ()`
import Combine
@available(macOS 10.15, *)
func test() {
let s = PassthroughSubject<Void, Never>()
s.send()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment