Explorar o código

use Null for extern constructors optional args (fixed issue #919)

Nicolas Cannasse %!s(int64=13) %!d(string=hai) anos
pai
achega
2db819ad99
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -1238,7 +1238,7 @@ let init_class ctx c p herits fields =
 						) f.tf_args
 					| _ ->
 						match follow cf.cf_type with
-						| TFun (args,_) -> List.map (fun (n,o,t) -> alloc_var n t, if o then Some TNull else None) args
+						| TFun (args,_) -> List.map (fun (n,o,t) -> alloc_var n (if o then ctx.t.tnull t else t), if o then Some TNull else None) args
 						| _ -> assert false
 				) in
 				let p = c.cl_pos in