mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
C++ foreign reference types have custom reference counting mechanisms, so they cannot conform to `AnyObject`. Currently Swift's type system treats C++ FRTs as `AnyObject`s on non-Darwin platforms, which is incorrect. This change makes sure the behavior is consistent with Darwin platform, i.e. a cast of C++ FRT to `AnyObject` is rejected by the typechecker. rdar://136664617
613 KiB
613 KiB