diff --git a/Assignments/04.rkt b/Assignments/04.rkt index ccfafae..9b62dfc 100644 --- a/Assignments/04.rkt +++ b/Assignments/04.rkt @@ -130,7 +130,7 @@ (type-case Type (typecheck fn env) [(arrowT arg-type result-type) (let ([actual-type (typecheck arg env)]) - (if (equal? arg-type actual-type) + (if (subtype? actual-type arg-type) ;; Use subtype? to check compatibility result-type (error 'typecheck "argument type")))] [else (error 'typecheck "not function")])]