finally.
This commit is contained in:
parent
579b9689d3
commit
b1cc807d45
@ -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")])]
|
||||
|
Loading…
x
Reference in New Issue
Block a user