TypeChecker
Inherits TypeUnifier < TypeEvaluator < CanError < Reference < Object
type inference algorithm
Constructors
Instance methods
context
Sourcedeclare(binding : Binding, dec_type : Hir.class, loc : Location, name : String, value : Cell(Ast::Expr) | Nil = nil) : Hir
Sourceenv
Sourceeval(*args)
Sourcefield_access(ast : Ast::FieldAccess)
Sourcefunction_call(location : Location, name : String, args : Array(Hir), type_args : Slice(Type) | Nil = nil) : Hir
Sourcelog
Sourcepattern_match(loc : Location, branches : Array(Ast::RTerm), enum_type : EnumDef, is_expression : Bool) : Array(Hir | Nil)
Sourcescope
Sourcespecializer
Sourcetry_function_call(location, func : FunctionDef, type_args : Slice(Type) | Nil, args : Array(Hir)) : OverloadMatch | Error
Sourceruns type checker for the ast node, but allows for inconsistent types on branches this is to allow control-flow nodes (eg if blocks) to be used as statements without needing to have a consistent return type in all branches