class

FunctionDef

Inherits HasSignature < Generic < Reference < Object

Constructors

new(location : Location, name : String, env : TypeEnv, type_params : Slice(Ast::TypeParameter) | Nil = nil, parameters : Array(Parameter) = [] of Parameter, return_mode : Mode = Mode::Move, return_type : Type = Type.nil, body : Ast::Expr = Ast::Block.empty)
Source
new(location : Location, name : String, signature : Signature, body : Ast::Expr)
Source

Instance methods

body
Source
extern?
Source
location
Source
name
Source
set_as_extern
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source