Forráskód Böngészése

disallow unnamed lvalue functions (closes #2199)

Simon Krajewski 12 éve
szülő
commit
5e27022505
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      typer.ml

+ 2 - 0
typer.ml

@@ -2843,6 +2843,8 @@ and type_expr ctx (e,p) (with_type:with_type) =
 				| _ -> ())
 			in
 			loop t
+		| NoValue ->
+			if name = None then display_error ctx "Unnamed lvalue functions are not supported" p
 		| _ ->
 			());
 		let ft = TFun (fun_args args,rt) in