class

Function

Inherits Reference < Object

monomorphized (non-generic) function

Constructors

new(function_def : FunctionDef, type_args : Slice(Type), index : Int32, body : Hir = Hir::Block.empty)

def initialize(@location : Location, @name : String, @index : Int32, @parameters : ::Array(Parameter) = [] of Parameter, @return_mode : Mode = Mode::Move, @return_type : Type = Type.nil, @body : Hir = Hir::Block.empty) end

Source

Instance methods

body

property parameters : ::Array(Parameter) = [] of Parameter property return_mode : Mode = Mode::Move property return_type : Type = Type.nil

Source
body=(body : Hir)

property parameters : ::Array(Parameter) = [] of Parameter property return_mode : Mode = Mode::Move property return_type : Type = Type.nil

Source
function_def
Source
function_def=(function_def : FunctionDef)
Source
index

property location : Location property name : String

Source
index=(index : Int32)

property location : Location property name : String

Source
location
Source
name
Source
parameters
Source
return_mode
Source
return_type
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
type_args
Source
type_args=(type_args : Slice(Type))
Source