AssociatedTypeDeclSyntax

An associatedtype declaration

SyntaxNodesAB.swift:1998
struct AssociatedTypeDeclSyntax

An example of an associatedtype declaration is

associatedtype Item

An associated type declaration may contain a type initializer clause which represents a default type assignment for the associated type.

associatedtype Item = Int

An associated type declaration may be declared with an inheritance clause which specifies the required conformances.

associatedtype Iterator: IteratorProtocol

A generic where clause may be present, here is an example which shows an associated type containing an inheritance clauses and a generic where clause.

associatedtype Iterator: IteratorProtocol where Iterator.Element == Item

Children