module

TypeUnifier

Instance methods

try_call(location : Location, func : FunctionDef, args) : Slice(Type) | Error
Source
unify(pattern : Type, patt_loc : Location, arg : Type, arg_type_src : Location, type_args : Slice(Type | Nil) | Slice(Type)) : Error | Nil

This function should return an error if the types are not compatible. Types are considered compatible if they are equal, or if pattern is a type variable and arg satisfies the variable's constraints. and collect type arguments along the way...

Source
unify(parameters : Array(Parameter) | Array(Field), args, type_args : Slice(Type | Nil) | Slice(Type)) : Error | Slice(Type)
Source
unify_deprecated(signature : Signature, args, return_mode : Mode | Nil = nil, return_type : Type | Nil = nil) : Error | Slice(Type)
Source