2
0
Эх сурвалжийг харах

do not error immediately if no unop operation can be found on an abstract because it might be castable to Int or Bool

Simon Krajewski 10 жил өмнө
parent
commit
037e7685a9
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -2324,7 +2324,7 @@ and type_unop ctx op flag e p =
 							if type_iseq (tfun [e.etype] m) tcf then cf,tcf,m else loop opl
 							if type_iseq (tfun [e.etype] m) tcf then cf,tcf,m else loop opl
 					| _ :: opl -> loop opl
 					| _ :: opl -> loop opl
 				in
 				in
-				let cf,t,r = try loop a.a_unops with Not_found -> error "Invalid operation" p in
+				let cf,t,r = try loop a.a_unops with Not_found -> raise Not_found in
 				(match cf.cf_expr with
 				(match cf.cf_expr with
 				| None ->
 				| None ->
 					let e = {e with etype = apply_params a.a_params pl a.a_this} in
 					let e = {e with etype = apply_params a.a_params pl a.a_this} in