Fixed a bug in semant.ml

- Function body type is now verified against the declared return type