Browse Source

don't force property method in interfaces.

Nicolas Cannasse 19 years ago
parent
commit
29171e547b
1 changed files with 1 additions and 1 deletions
  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