瀏覽代碼

[java/cs] Treat type parameters as Dynamic. Closes #1876

Caue Waneck 12 年之前
父節點
當前提交
afdbafd1bf
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      gencs.ml
  2. 2 1
      genjava.ml

+ 2 - 1
gencs.ml

@@ -722,7 +722,8 @@ let configure gen =
   in
 
   let is_dynamic t = match real_type t with
-    | TMono _ | TDynamic _ -> true
+    | TMono _ | TDynamic _
+    | TInst({ cl_kind = KTypeParameter _ }, _) -> true
     | TAnon anon ->
       (match !(anon.a_status) with
         | EnumStatics _ | Statics _ -> false

+ 2 - 1
genjava.ml

@@ -858,7 +858,8 @@ let configure gen =
   in
 
   let is_dynamic t = match real_type t with
-    | TMono _ | TDynamic _ -> true
+    | TMono _ | TDynamic _
+    | TInst({ cl_kind = KTypeParameter _ }, _) -> true
     | TAnon anon ->
       (match !(anon.a_status) with
         | EnumStatics _ | Statics _ | AbstractStatics _ -> false