-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[SR-14815] Regression (Linux): NotificationCenter silently failing since 5.4.1 #3218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@swift-ci create |
Cc @millenomi |
Comment by Helge Heß (JIRA) This is missing two things:
With those fixes it runs. |
Interestingly this seems to be a regression in Swift 5.4. Swift 5.3 warns you through a runtime crash that something is wrong, while Swift 5.4 just fails silently. |
Comment by Helge Heß (JIRA) Just to clarify: The missing subscription storage is properly reported in both 5.3.1 and 5.4.1. What is different is the `NSObject` fix, 5.3.1 complains about it at runtime: But in 5.4.1 just nothing happens if the adapter does not inherit from NSObject. Actually you'd think the compiler would already complain in `addObserver` in both cases (i.e. why is the `object` on Linux `Any` if `NSObjectProtocol` is required). |
Same behavior in 5.5.1. |
Environment
Swift 5.4, Ubuntu 20.x
Additional Detail from JIRA
md5: cb6a9bc2b9d5e55753c5d7918a8daec1
Issue Description:
Please see the following example program:
On Apple-platforms, this prints `Success: Notification did arrive!` – on Linux, it doesn't.
The text was updated successfully, but these errors were encountered: