|
@@ -400,7 +400,7 @@ let rec type_ident_raise ctx i p mode with_type =
|
|
| None -> raise Not_found
|
|
| None -> raise Not_found
|
|
| Some c ->
|
|
| Some c ->
|
|
let f = PMap.find i c.cl_statics in
|
|
let f = PMap.find i c.cl_statics in
|
|
- let e = type_module_type ctx (TClassDecl c) None p in
|
|
|
|
|
|
+ let e = type_module_type ctx (TClassDecl c) p in
|
|
field_access ctx mode f (FHStatic c) e p
|
|
field_access ctx mode f (FHStatic c) e p
|
|
)
|
|
)
|
|
with Not_found -> try
|
|
with Not_found -> try
|
|
@@ -423,7 +423,7 @@ let rec type_ident_raise ctx i p mode with_type =
|
|
if not (has_class_field_flag cf CfEnum) then
|
|
if not (has_class_field_flag cf CfEnum) then
|
|
loop l
|
|
loop l
|
|
else begin
|
|
else begin
|
|
- let et = type_module_type ctx (TClassDecl c) None p in
|
|
|
|
|
|
+ let et = type_module_type ctx (TClassDecl c) p in
|
|
let inline = match cf.cf_kind with
|
|
let inline = match cf.cf_kind with
|
|
| Var {v_read = AccInline} -> true
|
|
| Var {v_read = AccInline} -> true
|
|
| _ -> false
|
|
| _ -> false
|
|
@@ -445,7 +445,7 @@ let rec type_ident_raise ctx i p mode with_type =
|
|
| TEnumDecl e ->
|
|
| TEnumDecl e ->
|
|
try
|
|
try
|
|
let ef = PMap.find i e.e_constrs in
|
|
let ef = PMap.find i e.e_constrs in
|
|
- let et = type_module_type ctx t None p in
|
|
|
|
|
|
+ let et = type_module_type ctx t p in
|
|
ImportHandling.mark_import_position ctx pt;
|
|
ImportHandling.mark_import_position ctx pt;
|
|
wrap (mk (TField (et,FEnum (e,ef))) (enum_field_type ctx e ef p) p)
|
|
wrap (mk (TField (et,FEnum (e,ef))) (enum_field_type ctx e ef p) p)
|
|
with
|
|
with
|
|
@@ -456,7 +456,7 @@ let rec type_ident_raise ctx i p mode with_type =
|
|
(* lookup imported globals *)
|
|
(* lookup imported globals *)
|
|
let t, name, pi = PMap.find i ctx.m.module_globals in
|
|
let t, name, pi = PMap.find i ctx.m.module_globals in
|
|
ImportHandling.mark_import_position ctx pi;
|
|
ImportHandling.mark_import_position ctx pi;
|
|
- let e = type_module_type ctx t None p in
|
|
|
|
|
|
+ let e = type_module_type ctx t p in
|
|
type_field_default_cfg ctx e name p mode with_type
|
|
type_field_default_cfg ctx e name p mode with_type
|
|
|
|
|
|
and type_ident ctx i p mode with_type =
|
|
and type_ident ctx i p mode with_type =
|
|
@@ -474,7 +474,7 @@ and type_ident ctx i p mode with_type =
|
|
resolved_to_type_parameter := true;
|
|
resolved_to_type_parameter := true;
|
|
let c = match follow (extract_param_type t) with TInst(c,_) -> c | _ -> die "" __LOC__ in
|
|
let c = match follow (extract_param_type t) with TInst(c,_) -> c | _ -> die "" __LOC__ in
|
|
if TypeloadCheck.is_generic_parameter ctx c && Meta.has Meta.Const c.cl_meta then begin
|
|
if TypeloadCheck.is_generic_parameter ctx c && Meta.has Meta.Const c.cl_meta then begin
|
|
- let e = type_module_type ctx (TClassDecl c) None p in
|
|
|
|
|
|
+ let e = type_module_type ctx (TClassDecl c) p in
|
|
AKExpr {e with etype = (extract_param_type t)}
|
|
AKExpr {e with etype = (extract_param_type t)}
|
|
end else
|
|
end else
|
|
raise Not_found
|
|
raise Not_found
|
|
@@ -1267,7 +1267,7 @@ and type_map_declaration ctx e1 el with_type p =
|
|
let cf = PMap.find "set" c.cl_statics in
|
|
let cf = PMap.find "set" c.cl_statics in
|
|
let v = gen_local ctx tmap p in
|
|
let v = gen_local ctx tmap p in
|
|
let ev = mk (TLocal v) tmap p in
|
|
let ev = mk (TLocal v) tmap p in
|
|
- let ec = type_module_type ctx (TClassDecl c) None p in
|
|
|
|
|
|
+ let ec = type_module_type ctx (TClassDecl c) p in
|
|
let ef = mk (TField(ec,FStatic(c,cf))) (tfun [tkey;tval] ctx.t.tvoid) p in
|
|
let ef = mk (TField(ec,FStatic(c,cf))) (tfun [tkey;tval] ctx.t.tvoid) p in
|
|
let el = ev :: List.map2 (fun e1 e2 -> (make_call ctx ef [ev;e1;e2] ctx.com.basic.tvoid p)) el_k el_v in
|
|
let el = ev :: List.map2 (fun e1 e2 -> (make_call ctx ef [ev;e1;e2] ctx.com.basic.tvoid p)) el_k el_v in
|
|
let enew = mk (TNew(c,[tkey;tval],[])) tmap p in
|
|
let enew = mk (TNew(c,[tkey;tval],[])) tmap p in
|
|
@@ -2056,7 +2056,7 @@ and type_expr ?(mode=MGet) ctx (e,p) (with_type:WithType.t) =
|
|
let mt = Typeload.load_type_def ctx p_t tp in
|
|
let mt = Typeload.load_type_def ctx p_t tp in
|
|
if ctx.in_display && DisplayPosition.display_position#enclosed_in p_t then
|
|
if ctx.in_display && DisplayPosition.display_position#enclosed_in p_t then
|
|
DisplayEmitter.display_module_type ctx mt p_t;
|
|
DisplayEmitter.display_module_type ctx mt p_t;
|
|
- let e_t = type_module_type ctx mt None p_t in
|
|
|
|
|
|
+ let e_t = type_module_type ctx mt p_t in
|
|
let e_Std_isOfType =
|
|
let e_Std_isOfType =
|
|
match Typeload.load_type_raise ctx ([],"Std") "Std" p with
|
|
match Typeload.load_type_raise ctx ([],"Std") "Std" p with
|
|
| TClassDecl c ->
|
|
| TClassDecl c ->
|