Function
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
Instance methods
body
property parameters : ::Array(Parameter) = [] of Parameter property return_mode : Mode = Mode::Move property return_type : Type = Type.nil
body=(body : Hir)
property parameters : ::Array(Parameter) = [] of Parameter property return_mode : Mode = Mode::Move property return_type : Type = Type.nil
function_def
Sourcefunction_def=(function_def : FunctionDef)
Sourcelocation
Sourcename
Sourceparameters
Sourcereturn_mode
Sourcereturn_type
Sourceto_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>
type_args
Source