浏览代码

Change inherit to Inherit in $extend implementation, removing semicolon.

Both these are further common js warnings by linters.
Luca Deltodesco 12 年之前
父节点
当前提交
75e58a9e20
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -1142,7 +1142,7 @@ let generate com =
 	);
 	);
 	if List.exists (function TClassDecl { cl_extern = false; cl_super = Some _ } -> true | _ -> false) com.types then begin
 	if List.exists (function TClassDecl { cl_extern = false; cl_super = Some _ } -> true | _ -> false) com.types then begin
 		print ctx "function $extend(from, fields) {
 		print ctx "function $extend(from, fields) {
-	function inherit() {}; inherit.prototype = from; var proto = new inherit();
+	function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
 	for (var name in fields) proto[name] = fields[name];
 	for (var name in fields) proto[name] = fields[name];
 	if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
 	if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
 	return proto;
 	return proto;