InitializerDecl
public struct InitializerDecl : ExposableDecl, GenericDecl
An initializer declaration.
-
Declaration
Swift
public static let constructDescription: String -
The introducer of an initializer declaration.
See moreDeclaration
Swift
public enum Introducer : Codable, Sendable -
Declaration
Swift
public static let isCallable: Bool -
Declaration
Swift
public let site: SourceRange -
The introducer of the declaration.
Declaration
Swift
public let introducer: SourceRepresentable<Introducer> -
The attributes of the declaration.
Declaration
Swift
public let attributes: [SourceRepresentable<Attribute>] -
The access modifier of the declaration, if any.
Declaration
Swift
public let accessModifier: SourceRepresentable<AccessModifier> -
The generic clause of the declaration, if any.
Declaration
Swift
public let genericClause: SourceRepresentable<GenericClause>? -
The parameters of the initializer.
These declarations must have a type annotation.
Declaration
Swift
public let parameters: [ParameterDecl.ID] -
The declaration of the implicit receiver parameter.
Declaration
Swift
public let receiver: ParameterDecl.ID -
The body of the declaration, if any.
Declaration
Swift
public let body: BraceStmt.ID? -
Creates an instance with the given properties.
Declaration
Swift
public init( introducer: SourceRepresentable<Introducer>, attributes: [SourceRepresentable<Attribute>], accessModifier: SourceRepresentable<AccessModifier>, genericClause: SourceRepresentable<GenericClause>?, parameters: [ParameterDecl.ID], receiver: ParameterDecl.ID, body: BraceStmt.ID?, site: SourceRange ) -
trueiffselfis a definition of the entity that it declares.Declaration
Swift
public var isDefinition: Bool { get } -
Returns whether the declaration is a memberwise initializer.
Declaration
Swift
public var isMemberwise: Bool { get } -
Declaration
Swift
public func validateForm(in ast: AST, reportingDiagnosticsTo log: inout DiagnosticSet)
View on GitHub