Explorar o código

Ensure semicolon is inserted after class defn with no constructor

Main = function () { };

instead of

Main = function () { }

(This is a JSHint error).
Luca Deltodesco %!s(int64=12) %!d(string=hai) anos
pai
achega
9d1d6e51e5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -927,7 +927,7 @@ let generate_class ctx c =
 		print ctx "%s = $hxClasses[\"%s\"] = " p (dot_path c.cl_path);
 	(match c.cl_constructor with
 	| Some { cf_expr = Some e } -> gen_expr ctx e
-	| _ -> print ctx "function() { }");
+	| _ -> (print ctx "function() { }"); ctx.separator <- true);
 	newline ctx;
 	if ctx.js_modern && hxClasses then begin
 		print ctx "$hxClasses[\"%s\"] = %s" (dot_path c.cl_path) p;