Skip to content

Commit 6e8ee7c

Browse files
authored
[docs] Fix small mistake in DynamicCasting.md (swiftlang#33641)
Foundation has no `Number` type.
1 parent 12dd83d commit 6e8ee7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/DynamicCasting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Implementation Note: `AnyObject` is represented in memory as a pointer to a refc
191191
### Objective-C Interactions
192192

193193
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.
195195
As a result, when Foundation is in scope, `Int(7) is Double == false` but `(Int(7) as! AnyObject) is Double == true`.
196196
In general, the ability to add new bridging behaviors from a single type to several distinct types implies that Swift casting cannot be transitive.
197197

0 commit comments

Comments
 (0)