mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
This commit is contained in:
@@ -51,13 +51,7 @@ public struct Mirror {
|
||||
/// `AncestorRepresentation`. This setting has no effect on mirrors
|
||||
/// reflecting value type instances.
|
||||
public enum AncestorRepresentation {
|
||||
/// Generate a default mirror for all ancestor classes. This is the
|
||||
/// default behavior.
|
||||
///
|
||||
/// - Note: This option bypasses any implementation of `customMirror`
|
||||
/// that may be supplied by a `CustomReflectable` ancestor, so this
|
||||
/// is typically not the right option for a `customMirror`implementation
|
||||
|
||||
|
||||
/// Generate a default mirror for all ancestor classes.
|
||||
///
|
||||
/// This case is the default.
|
||||
@@ -144,7 +138,7 @@ public struct Mirror {
|
||||
@warn_unused_result
|
||||
static func _noSuperclassMirror() -> Mirror? { return nil }
|
||||
|
||||
/// Return the legacy mirror representing the part of `subject`
|
||||
/// Returns the legacy mirror representing the part of `subject`
|
||||
/// corresponding to the superclass of `staticSubclass`.
|
||||
@warn_unused_result
|
||||
internal static func _legacyMirror(
|
||||
@@ -379,6 +373,7 @@ extension Mirror {
|
||||
}
|
||||
|
||||
/// Return a specific descendant of the reflected subject, or `nil`
|
||||
/// Returns a specific descendant of the reflected subject, or `nil`
|
||||
/// if no such descendant exists.
|
||||
///
|
||||
/// A `String` argument selects the first `Child` with a matching label.
|
||||
@@ -696,14 +691,13 @@ extension PlaygroundQuickLook {
|
||||
/// `CustomPlaygroundQuickLookable` and return a custom
|
||||
/// `PlaygroundQuickLook`.
|
||||
public protocol CustomPlaygroundQuickLookable {
|
||||
/// Return the `Mirror` for `self`.
|
||||
/// The `PlaygroundQuickLook` for `self`.
|
||||
///
|
||||
/// - Note: If `Self` has value semantics, the `Mirror` should be
|
||||
/// unaffected by subsequent mutations of `self`.
|
||||
/// - Note: If `Self` has value semantics, the `PlaygroundQuickLook`
|
||||
/// should be unaffected by subsequent mutations of `self`.
|
||||
var customPlaygroundQuickLook: PlaygroundQuickLook { get }
|
||||
}
|
||||
|
||||
|
||||
//===--- General Utilities ------------------------------------------------===//
|
||||
// This component could stand alone, but is used in Mirror's public interface.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user