You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DynamicCasting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ Implementation Note: `AnyObject` is represented in memory as a pointer to a refc
191
191
### Objective-C Interactions
192
192
193
193
Note the invariant above cannot be an equality because Objective-C bridging allows libraries to introduce new relationships that can alter the behavior of seemingly-unrelated casts.
194
-
One example of this is Foundation's `Number` (or `NSNumber`) type which conditionally bridges to several Swift numeric types.
194
+
One example of this is Foundation's `NSNumber` type which conditionally bridges to several Swift numeric types.
195
195
As a result, when Foundation is in scope, `Int(7) is Double == false` but `(Int(7) as! AnyObject) is Double == true`.
196
196
In general, the ability to add new bridging behaviors from a single type to several distinct types implies that Swift casting cannot be transitive.
0 commit comments