浏览代码

[js] use proper type accessor for extending properties (closes #5772)

Dan Korostelev 8 年之前
父节点
当前提交
9b3f9836c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/generators/genjs.ml

+ 1 - 1
src/generators/genjs.ml

@@ -1134,7 +1134,7 @@ let generate_class ctx c =
 			| _ when props = [] -> ()
 			| Some (csup,_) when Codegen.has_properties csup ->
 				newprop ctx;
-				let psup = s_path ctx csup.cl_path in
+				let psup = ctx.type_accessor (TClassDecl csup) in
 				print ctx "__properties__: $extend(%s.prototype.__properties__,{%s})" psup (gen_props props)
 			| _ ->
 				newprop ctx;