Browse Source

[js] properly extend extern classes when -D js-flatten (see #3416)

Dan Korostelev 11 years ago
parent
commit
c04e2ad1d7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -1024,7 +1024,7 @@ let generate_class ctx c =
 		(match c.cl_super with
 		(match c.cl_super with
 		| None -> print ctx "%s.prototype = {" p;
 		| None -> print ctx "%s.prototype = {" p;
 		| Some (csup,_) ->
 		| Some (csup,_) ->
-			let psup = s_path ctx csup.cl_path in
+			let psup = ctx.type_accessor (TClassDecl csup) in
 			print ctx "%s.__super__ = %s" p psup;
 			print ctx "%s.__super__ = %s" p psup;
 			newline ctx;
 			newline ctx;
 			print ctx "%s.prototype = $extend(%s.prototype,{" p psup;
 			print ctx "%s.prototype = $extend(%s.prototype,{" p psup;