Ver código fonte

treat DMNone like DMDefault because apparently it can happen in macros

Simon Krajewski 11 anos atrás
pai
commit
d0b8eddc3d
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1 3
      typer.ml

+ 1 - 3
typer.ml

@@ -3364,8 +3364,6 @@ and handle_display ctx e iscall p =
 		cf.cf_meta <- (Meta.Usage,[],p) :: cf.cf_meta;
 		cf.cf_meta <- (Meta.Usage,[],p) :: cf.cf_meta;
 	in
 	in
 	match ctx.com.display with
 	match ctx.com.display with
-	| DMNone ->
-		assert false
 	| DMUsage | DMPosition ->
 	| DMUsage | DMPosition ->
 		(* print_endline (s_expr (s_type (print_context())) e); *)
 		(* print_endline (s_expr (s_type (print_context())) e); *)
 		begin match e.eexpr with
 		begin match e.eexpr with
@@ -3395,7 +3393,7 @@ and handle_display ctx e iscall p =
 		e
 		e
 	| DMToplevel ->
 	| DMToplevel ->
 		collect_toplevel_identifiers ctx;
 		collect_toplevel_identifiers ctx;
-	| DMDefault ->
+	| DMDefault | DMNone ->
 		let opt_args args ret = TFun(List.map(fun (n,o,t) -> n,true,t) args,ret) in
 		let opt_args args ret = TFun(List.map(fun (n,o,t) -> n,true,t) args,ret) in
 		let e = match e.eexpr with
 		let e = match e.eexpr with
 			| TField (e1,fa) ->
 			| TField (e1,fa) ->