Simplified type system
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user