struct

Ast::Struct

Inherits Ast::TypeDeclaration < Ast::HasTypeParams < Ast::TopLevelItem < IrNode < Struct < Value < Object

Constructors

new(location : Location, name : ::String, type_params : Slice(TypeParameter) | ::Nil = nil, traits : ::Array(Type) | ::Nil = nil, fields : ::Array(Field) = [] of Field, convention : Convention = nil)
Source
new(location : Location, convention : Convention, name : ::String, type_params : Slice(TypeParameter) | ::Nil = nil, traits : ::Array(Type) | ::Nil = nil, fields : ::Array(Field) = [] of Field)
Source

Instance methods

fields
Source
fields=(fields : ::Array(Field))
Source
to_s(io : IO)

Same as #inspect(io).

Source