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/ContinuousIntegration.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ We describe each in detail below:
49
49
50
50
Platform | Comment | Check Status
51
51
------------ | ------- | ------------
52
-
All supported platforms | @swift-ci Please smoke test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
53
-
All supported platforms | @swift-ci Please clean smoke test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
54
-
All supported platforms | @swift-ci Please smoke test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
55
-
All supported platforms | @swift-ci Please clean smoke test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)
56
-
macOS platform | @swift-ci Please smoke test OS X platform | Swift Test OS X Platform (smoke test)
57
-
macOS platform | @swift-ci Please clean smoke test OS X platform | Swift Test OS X Platform (smoke test)
52
+
All supported platforms | @swift-ci Please smoke test | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)
53
+
All supported platforms | @swift-ci Please clean smoke test | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)
54
+
All supported platforms | @swift-ci Please smoke test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)
55
+
All supported platforms | @swift-ci Please clean smoke test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)
56
+
macOS platform | @swift-ci Please smoke test macOS platform | Swift Test macOS Platform (smoke test)
57
+
macOS platform | @swift-ci Please clean smoke test macOS platform | Swift Test macOS Platform (smoke test)
58
58
Linux platform | @swift-ci Please smoke test Linux platform | Swift Test Linux Platform (smoke test)
59
59
Linux platform | @swift-ci Please clean smoke test Linux platform | Swift Test Linux Platform (smoke test)
60
60
@@ -84,17 +84,17 @@ A smoke test on Linux does the following:
84
84
85
85
Platform | Comment | Check Status
86
86
------------ | ------- | ------------
87
-
All supported platforms | @swift-ci Please test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
88
-
All supported platforms | @swift-ci Please clean test | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test OS X Platform<br>
89
-
All supported platforms | @swift-ci Please test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test OS X Platform
90
-
All supported platforms | @swift-ci Please clean test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test OS X Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test OS X Platform
91
-
macOS platform | @swift-ci Please test OS X platform | Swift Test OS X Platform (smoke test)<br>Swift Test OS X Platform
92
-
macOS platform | @swift-ci Please clean test OS X platform | Swift Test OS X Platform (smoke test)<br>Swift Test OS X Platform
93
-
macOS platform | @swift-ci Please benchmark | Swift Benchmark on OS X Platform (many runs - rigorous)
94
-
macOS platform | @swift-ci Please smoke benchmark | Swift Benchmark on OS X Platform (few runs - sanity)
87
+
All supported platforms | @swift-ci Please test | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test macOS Platform<br>
88
+
All supported platforms | @swift-ci Please clean test | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)<br>Swift Test Linux Platform<br>Swift Test macOS Platform<br>
89
+
All supported platforms | @swift-ci Please test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test macOS Platform
90
+
All supported platforms | @swift-ci Please clean test and merge | Swift Test Linux Platform (smoke test)<br>Swift Test macOS Platform (smoke test)<br> Swift Test Linux Platform <br>Swift Test macOS Platform
91
+
macOS platform | @swift-ci Please test macOS platform | Swift Test macOS Platform (smoke test)<br>Swift Test macOS Platform
92
+
macOS platform | @swift-ci Please clean test macOS platform | Swift Test macOS Platform (smoke test)<br>Swift Test macOS Platform
93
+
macOS platform | @swift-ci Please benchmark | Swift Benchmark on macOS Platform (many runs - rigorous)
Copy file name to clipboardExpand all lines: docs/DynamicCasting.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,6 +302,8 @@ Casting from a function type F1 to a function type F2 will succeed iff the follo
302
302
303
303
Note that it is _not_ sufficient for argument and return types to be castable; they must actually be identical.
304
304
305
+
Caveat: The current Swift compiler supports more general casts of function types in certain cases where the compiler has enough information to statically construct the necessary adapter function. Function types that must be cast at runtime follow the less permissive rules described above.
306
+
305
307
## Existential Types
306
308
307
309
Conceptually, an "existential type" is an opaque wrapper that carries a type and an instance of that type.
@@ -372,7 +374,7 @@ For casting purposes, `AnyHashable` behaves like an existential type.
372
374
It satisfies the weak existential invariant above.
373
375
374
376
However, note that `AnyHashable` does not act like an existential for other purposes.
375
-
For example, it's metatype is named `AnyHashable.Type` and it does not have an existential metatype.
377
+
For example, its metatype is named `AnyHashable.Type` and it does not have an existential metatype.
376
378
377
379
### Protocol Witness types
378
380
@@ -491,6 +493,12 @@ Non-protocol types do not have existential metatypes.
491
493
For a generic variable `G`, the expression also refers to the regular metatype, even if the generic variable is bound to a protocol.
492
494
There is no mechanism in Swift to refer to the existential metatype via a generic variable.)
493
495
496
+
In essence, an existential metatype simply defines an existential that can hold a metatype instance.
497
+
An instance of the existential metatype `Any.Type` can hold any metatype instance.
498
+
An instance of the existential metatype `P.Type` of a protocol `P` can hold a metatype instance of any type that conforms to `P`.
499
+
As with other existentials, casting _from_ an existential metatype is equivalent to casting the contents of the existential.
500
+
Casting _to_ an existential metatype succeeds whenever the source is a conforming metatype instance (or can be unwrapped to yield such a metatype instance).
0 commit comments