浏览代码

[Java] abstract fixes

Simon Krajewski 12 年之前
父节点
当前提交
7caec5014d
共有 3 个文件被更改,包括 5 次插入6 次删除
  1. 2 0
      genjava.ml
  2. 3 3
      std/java/StdTypes.hx
  3. 0 3
      std/java/_std/Array.hx

+ 2 - 0
genjava.ml

@@ -871,6 +871,8 @@ let configure gen =
               path_s_import pos (["java";"lang"], "Object"))
               path_s_import pos (["java";"lang"], "Object"))
         | TDynamic _ ->
         | TDynamic _ ->
             path_s_import pos (["java";"lang"], "Object")
             path_s_import pos (["java";"lang"], "Object")
+      | TAbstract(a,pl) when a.a_impl <> None ->
+        t_s pos (apply_params a.a_types pl a.a_this)
       (* No Lazy type nor Function type made. That's because function types will be at this point be converted into other types *)
       (* No Lazy type nor Function type made. That's because function types will be at this point be converted into other types *)
       | _ -> if !strict_mode then begin trace ("[ !TypeError " ^ (Type.s_type (Type.print_context()) t) ^ " ]"); assert false end else "[ !TypeError " ^ (Type.s_type (Type.print_context()) t) ^ " ]"
       | _ -> if !strict_mode then begin trace ("[ !TypeError " ^ (Type.s_type (Type.print_context()) t) ^ " ]"); assert false end else "[ !TypeError " ^ (Type.s_type (Type.print_context()) t) ^ " ]"
 
 

+ 3 - 3
std/java/StdTypes.hx

@@ -26,6 +26,6 @@ package java;
  * @author waneck
  * @author waneck
  */
  */
 
 
-@:notNull @:runtimeValue abstract Int8 <= Int {}
-@:notNull @:runtimeValue abstract Int16 <= Int {}
-@:notNull @:runtimeValue abstract Char16 <= Int {}
+@:notNull @:runtimeValue @:coreType abstract Int8 from Int {}
+@:notNull @:runtimeValue @:coreType abstract Int16 from Int {}
+@:notNull @:runtimeValue @:coreType abstract Char16 from Int {}

文件差异内容过多而无法显示
+ 0 - 3
std/java/_std/Array.hx


部分文件因为文件数量过多而无法显示