浏览代码

allow @:native on abstracts

Simon Krajewski 12 年之前
父节点
当前提交
3d9e15c724
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      codegen.ml
  2. 1 1
      type.ml

+ 4 - 0
codegen.ml

@@ -638,6 +638,10 @@ let apply_native_paths ctx t =
 			let meta,path = get_real_path e.e_meta e.e_path in
 			e.e_meta <- meta :: e.e_meta;
 			e.e_path <- path;
+		| TAbstractDecl a ->
+			let meta,path = get_real_path a.a_meta a.a_path in
+			a.a_meta <- meta :: a.a_meta;
+			a.a_path <- path;
 		| _ ->
 			())
 	with Not_found ->

+ 1 - 1
type.ml

@@ -244,7 +244,7 @@ and tdef = {
 }
 
 and tabstract = {
-	a_path : path;
+	mutable a_path : path;
 	a_module : module_def;
 	a_pos : Ast.pos;
 	a_private : bool;