Преглед изворни кода

don't force property method in interfaces.

Nicolas Cannasse пре 19 година
родитељ
комит
29171e547b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -1823,7 +1823,7 @@ let init_class ctx c p herits fields =
 					unify_raise ctx t2 t p;
 				with
 					| Error (Unify l,_) -> raise (Error (Stack (Custom ("In method " ^ m ^ " required by property " ^ name),Unify l),p))
-					| Not_found -> error ("Method " ^ m ^ " required by property " ^ name ^ " is missing") p
+					| Not_found -> if not c.cl_interface then error ("Method " ^ m ^ " required by property " ^ name ^ " is missing") p
 			in
 			let get = (match get with
 				| "null" -> NoAccess