Type

public struct Type : Hashable, Sendable

The lowered (static) type of an entity.

Note: when qualified, this must be spelled IR.Type (https://github.com/apple/swift/issues/67378)

  • ast

    A high-level representation of the type.

    Declaration

    Swift

    public let ast: AnyType
  • Indicates whether this is an address type.

    Declaration

    Swift

    public let isAddress: Bool
  • Creates a lowered type.

    Requires

    ast must be canonical.

    Declaration

    Swift

    public init<T>(ast: T, isAddress: Bool) where T : TypeProtocol
  • Indicates whether this is an object type.

    Declaration

    Swift

    public var isObject: Bool { get }
  • Creates an object type.

    Declaration

    Swift

    public static func object<T>(_ type: T) -> Type where T : TypeProtocol
  • Creates and address type.

    Declaration

    Swift

    public static func address<T>(_ type: T) -> Type where T : TypeProtocol