|
@@ -1594,10 +1594,16 @@ and type_call ?(mode=MGet) ctx e el (with_type:WithType.t) inline p =
|
|
|
| TFun signature -> type_bind ctx e signature args p
|
|
|
| _ -> def ())
|
|
|
| (EConst (Ident "$type"),_) , [e] ->
|
|
|
- let e = type_expr ctx e WithType.value in
|
|
|
- ctx.com.warning (s_type (print_context()) e.etype) e.epos;
|
|
|
- let e = Diagnostics.secure_generated_code ctx e in
|
|
|
- e
|
|
|
+ begin match fst e with
|
|
|
+ | EConst (Ident "_") ->
|
|
|
+ ctx.com.warning (WithType.to_string with_type) p;
|
|
|
+ mk (TConst TNull) t_dynamic p
|
|
|
+ | _ ->
|
|
|
+ let e = type_expr ctx e WithType.value in
|
|
|
+ ctx.com.warning (s_type (print_context()) e.etype) e.epos;
|
|
|
+ let e = Diagnostics.secure_generated_code ctx e in
|
|
|
+ e
|
|
|
+ end
|
|
|
| (EField(e,"match"),p), [epat] ->
|
|
|
let et = type_expr ctx e WithType.value in
|
|
|
let rec has_enum_match t = match follow t with
|