소스 검색

do not consider Void when checking return flow (fixed issue #1815)

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

+ 1 - 1
typeload.ml

@@ -1033,7 +1033,7 @@ let type_function ctx args ret fmode f do_display p =
 	in
 	let rec loop e =
 		match e.eexpr with
-		| TReturn (Some _) -> raise Exit
+		| TReturn (Some e) -> (match follow e.etype with TAbstract({a_path = [],"Void"},[]) -> () | _ -> raise Exit)
 		| TFunction _ -> ()
 		| _ -> Type.iter loop e
 	in