Taddeus Kroes hace 12 años
padre
commit
a1fb541ec0
Se han modificado 1 ficheros con 5 adiciones y 4 borrados
  1. 5 4
      phases/typecheck.ml

+ 5 - 4
phases/typecheck.ml

@@ -44,10 +44,11 @@ let check_type ?(msg="") expected node =
   let got = typeof node in
   if (spec got) <> (spec expected) then begin
     let msg = match msg with
-      | "" -> sprintf "type mismatch: expected type %s, got %s"
-              (type2str_error expected) (type2str_error got)
-      | _ -> msg
-    in raise (NodeError (node, msg))
+    | "" -> sprintf "type mismatch: expected type %s, got %s"
+            (type2str_error expected) (type2str_error got)
+    | _ -> msg
+    in
+    raise (NodeError (node, msg))
   end
 
 let op_types = function