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.
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:
```
root@a0e1f63ce52e:/tmp# ./test
Could not cast value of type 'test.ConcreteAdapter' (0x55936587d158) to 'Foundation.NSObject' (0x7fb617a5fbc8).
Aborted
```
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).
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: