TraitDecl
public struct TraitDecl : ExposableDecl, SingleEntityDecl, LexicalScope
extension TraitDecl: GenericScope
A trait declaration.
-
Declaration
Swift
public static let constructDescription: String -
Declaration
Swift
public let site: SourceRange -
The site of the
traitintroducer.Declaration
Swift
public let introducerSite: SourceRange -
The access modifier of the declaration, if any.
Declaration
Swift
public let accessModifier: SourceRepresentable<AccessModifier> -
The identifier of the trait.
Declaration
Swift
public let identifier: SourceRepresentable<Identifier> -
The names of inherited traits.
Declaration
Swift
public let bounds: [NameExpr.ID] -
The member declarations in the lexical scope of the trait.
Declaration
Swift
public let members: [AnyDeclID] -
The declaration of the trait’s
Selfparameter.Declaration
Swift
public let receiver: GenericParameterDecl.ID -
Creates an instance with the given properties.
Declaration
Swift
public init( introducerSite: SourceRange, accessModifier: SourceRepresentable<AccessModifier>, identifier: SourceRepresentable<Identifier>, bounds: [NameExpr.ID], members: [AnyDeclID], selfParameterDecl: GenericParameterDecl.ID, site: SourceRange ) -
Declaration
Swift
public var baseName: String { get } -
Declaration
Swift
public func validateForm(in ast: AST, reportingDiagnosticsTo log: inout DiagnosticSet) -
Declaration
Swift
public var genericParameters: [GenericParameterDecl.ID] { get }
View on GitHub