Nicolas Cannasse hace 13 años
padre
commit
c58a919772
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      genjs.ml

+ 3 - 0
genjs.ml

@@ -716,6 +716,9 @@ let generate_class ctx c =
 	ctx.current <- c;
 	ctx.curmethod <- ("new",true);
 	ctx.id_counter <- 0;
+	(match c.cl_path with
+	| [],"Function" -> error "This class redefine a native one" c.cl_pos
+	| _ -> ());
 	let p = s_path ctx c.cl_path in
 	generate_package_create ctx c.cl_path;
 	print ctx "%s = $hxClasses[\"%s\"] = " p p;