MethodType
public struct MethodType : TypeProtocol
extension MethodType: CallableType
extension MethodType: CustomStringConvertible
The overarching type of a method declaration.
-
The capabilities of the bundle.
Declaration
Swift
public let capabilities: AccessEffectSet -
The type of the receiver.
Declaration
Swift
public let receiver: AnyType -
The inout labels and types of the method.
Declaration
Swift
public let inputs: [CallableTypeParameter] -
The output type of the method.
Declaration
Swift
public let output: AnyType -
Declaration
Swift
public let flags: ValueFlags -
Creates an instance with the given properties.
Declaration
Swift
public init( capabilities: AccessEffectSet, receiver: AnyType, inputs: [CallableTypeParameter], output: AnyType ) -
Returns the type of the variant
kin this bundle.See moreRequires
kis in the capabilities ofself.Declaration
Swift
public func variant(_ k: AccessEffect) -> ArrowType -
Returns the output type of a reference to a method having this type and being used mutably iff
isMutatingistrue.Declaration
Swift
public func outputOfUse(mutable isMutating: Bool) -> AnyType -
Declaration
Swift
public func transformParts<M>( mutating m: inout M, _ transformer: (inout M, AnyType) -> TypeTransformAction ) -> Self -
Declaration
Swift
public var isArrow: Bool { get } -
Declaration
Swift
public var description: String { get }
View on GitHub