File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -304,8 +304,8 @@ let rec load_params ctx info params p =
304
304
let is_java_rest = ctx.com.platform = Jvm && info.build_extern in
305
305
let is_rest = is_rest || is_java_rest in
306
306
let load_param t def =
307
- match (t, def) with
308
- | TPExpr e , _ ->
307
+ match t with
308
+ | TPExpr e ->
309
309
let name = (match fst e with
310
310
| EConst (String(s ,_ )) -> " S" ^ s
311
311
| EConst (Int (_ ,_ ) as c ) -> " I" ^ s_constant c
@@ -318,11 +318,12 @@ let rec load_params ctx info params p =
318
318
let c = mk_class ctx.m.curmod ([] ,name) p (pos e) in
319
319
c.cl_kind < - KExpr e;
320
320
TInst (c,[] ),pos e
321
- | TPType (CTPath({ path = { tpackage = [" $" ]; tname = "_hx_default" } } ),p ), None ->
322
- raise_typing_error " Cannot apply default type parameter on non-default type parameter" p
323
- | TPType (CTPath({ path = { tpackage = [" $" ]; tname = "_hx_default" } } ),p ), Some def ->
324
- def,p
325
- | TPType t , _ ->
321
+ | TPType (CTPath({ path = { tpackage = [" $" ]; tname = "_hx_default" } } ),p ) ->
322
+ (match def with
323
+ | Some def -> def,p
324
+ | None -> raise_typing_error " Cannot apply default type parameter on non-default type parameter" p
325
+ )
326
+ | TPType t ->
326
327
load_complex_type ctx true LoadNormal t,pos t
327
328
in
328
329
let checks = DynArray. create () in
You can’t perform that action at this time.
0 commit comments