Simplified type system

This commit is contained in:
Eduard Urbach 2025-02-04 23:58:01 +01:00
parent 71d7cdf5b2
commit bd0a468282
Signed by: eduard
GPG key ID: 49226B848C78F6C8
16 changed files with 70 additions and 55 deletions

View file

@ -92,10 +92,10 @@ func (f *Function) CompileCall(root *expression.Expression) (*Function, error) {
return nil, err
}
if !types.Check(typ, fn.Parameters[i].Type) {
if !types.Is(typ, fn.Parameters[i].Type) {
return nil, errors.New(&errors.TypeMismatch{
Encountered: typ.UniqueName(),
Expected: fn.Parameters[i].Type.UniqueName(),
Encountered: typ.Name(),
Expected: fn.Parameters[i].Type.Name(),
ParameterName: fn.Parameters[i].Name,
}, f.File, parameters[i].Token.Position)
}