Explorar o código

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

Caue Waneck %!s(int64=12) %!d(string=hai) anos
pai
achega
afdbafd1bf
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  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