A declaration with a type.

The type can either be explicitly specified (type is a Type) or inferred (type is a Modifier that indicates type inference).


shared String name;
shared actual void visit(Node that) { print(that); that.visitChildren(this); }
definitionshared formal AnySpecifier|Block? definition

The definition of the declaration, if present.

nameshared formal MemberName name

The name of the declaration.

typeshared formal Type|VariadicType|TypeModifier type

The type of the declaration, or a modifier indicating type inference.

Inherited Attributes
Attributes inherited from: Declaration
Attributes inherited from: Node
Attributes inherited from: Object
hash, string
Inherited Methods
Methods inherited from: Node
Methods inherited from: Object