Browse Source

Improve some error message terminology

Jens Fischer 6 years ago
parent
commit
6b680bebc0
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/syntax/grammar.mly
  2. 1 1
      src/typing/typeloadModule.ml

+ 1 - 1
src/syntax/grammar.mly

@@ -1103,7 +1103,7 @@ and arrow_function p1 al er s =
 		EFunction(None, { f_params = []; f_type = None; f_args = al; f_expr = Some (EReturn(Some e), (snd e));  }), punion p1 (pos e)
 	in
 	List.iter (fun (_,_,ml,_,_) ->	match ml with
-		| (_,_,p) :: _ -> syntax_error (Custom "Metadata on lambda arguments is not allowed") ~pos:(Some p) s ()
+		| (_,_,p) :: _ -> syntax_error (Custom "Metadata on arrow function arguments is not allowed") ~pos:(Some p) s ()
 		| [] -> ()
 	) al;
 	make er

+ 1 - 1
src/typing/typeloadModule.ml

@@ -633,7 +633,7 @@ let init_module_type ctx context_init do_init (decl,p) =
 					let pnames = ref PMap.empty in
 					TFun (List.map (fun (s,opt,(t,tp)) ->
 						(match t with CTPath({tpackage=[];tname="Void"}) -> error "Arguments of type Void are not allowed in enum constructors" tp | _ -> ());
-						if PMap.mem s (!pnames) then error ("Duplicate parameter '" ^ s ^ "' in enum constructor " ^ fst c.ec_name) p;
+						if PMap.mem s (!pnames) then error ("Duplicate argument `" ^ s ^ "` in enum constructor " ^ fst c.ec_name) p;
 						pnames := PMap.add s () (!pnames);
 						s, opt, load_type_hint ~opt ctx p (Some (t,tp))
 					) l, rt)