소스 검색

fix unification error report on TFun with void return

Simon Krajewski 12 년 전
부모
커밋
dcdef91da0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      type.ml

+ 1 - 1
type.ml

@@ -1066,7 +1066,7 @@ let rec unify a b =
 		let i = ref 0 in
 		(try
 			(match r2 with
-			| TAbstract ({a_path=[],"Void"},_) -> ()
+			| TAbstract ({a_path=[],"Void"},_) -> incr i
 			| _ -> unify r1 r2; incr i);
 			List.iter2 (fun (_,o1,t1) (_,o2,t2) ->
 				if o1 && not o2 then error [Cant_force_optional];