|
@@ -296,7 +296,7 @@ and display_expr ctx e_ast e dk with_type p =
|
|
| None -> error "Current class does not have a super" p
|
|
| None -> error "Current class does not have a super" p
|
|
| Some (c,params) ->
|
|
| Some (c,params) ->
|
|
let _, f = get_constructor ctx c params p in
|
|
let _, f = get_constructor ctx c params p in
|
|
- f
|
|
|
|
|
|
+ f,c
|
|
in
|
|
in
|
|
match ctx.com.display.dms_kind with
|
|
match ctx.com.display.dms_kind with
|
|
| DMResolve _ | DMPackage ->
|
|
| DMResolve _ | DMPackage ->
|
|
@@ -310,8 +310,10 @@ and display_expr ctx e_ast e dk with_type p =
|
|
let rec loop e = match e.eexpr with
|
|
let rec loop e = match e.eexpr with
|
|
| TField(_,FEnum(_,ef)) ->
|
|
| TField(_,FEnum(_,ef)) ->
|
|
Display.ReferencePosition.set (ef.ef_name,ef.ef_name_pos,SKEnumField ef);
|
|
Display.ReferencePosition.set (ef.ef_name,ef.ef_name_pos,SKEnumField ef);
|
|
- | TField(_,(FAnon cf | FInstance (_,_,cf) | FStatic (_,cf) | FClosure (_,cf))) ->
|
|
|
|
- Display.ReferencePosition.set (cf.cf_name,cf.cf_name_pos,SKField cf);
|
|
|
|
|
|
+ | TField(_,(FAnon cf | FClosure (None,cf))) ->
|
|
|
|
+ Display.ReferencePosition.set (cf.cf_name,cf.cf_name_pos,SKField (cf,None));
|
|
|
|
+ | TField(_,(FInstance (c,_,cf) | FStatic (c,cf) | FClosure (Some (c,_),cf))) ->
|
|
|
|
+ Display.ReferencePosition.set (cf.cf_name,cf.cf_name_pos,SKField (cf,Some c.cl_path));
|
|
| TLocal v | TVar(v,_) ->
|
|
| TLocal v | TVar(v,_) ->
|
|
Display.ReferencePosition.set (v.v_name,v.v_pos,SKVariable v);
|
|
Display.ReferencePosition.set (v.v_name,v.v_pos,SKVariable v);
|
|
| TTypeExpr mt ->
|
|
| TTypeExpr mt ->
|
|
@@ -326,8 +328,8 @@ and display_expr ctx e_ast e dk with_type p =
|
|
end
|
|
end
|
|
| TCall({eexpr = TConst TSuper},_) ->
|
|
| TCall({eexpr = TConst TSuper},_) ->
|
|
begin try
|
|
begin try
|
|
- let cf = get_super_constructor() in
|
|
|
|
- Display.ReferencePosition.set (cf.cf_name,cf.cf_name_pos,SKField cf);
|
|
|
|
|
|
+ let cf,c = get_super_constructor() in
|
|
|
|
+ Display.ReferencePosition.set (cf.cf_name,cf.cf_name_pos,SKField (cf,Some c.cl_path));
|
|
with Not_found ->
|
|
with Not_found ->
|
|
()
|
|
()
|
|
end
|
|
end
|
|
@@ -380,7 +382,7 @@ and display_expr ctx e_ast e dk with_type p =
|
|
end
|
|
end
|
|
| TCall({eexpr = TConst TSuper},_) ->
|
|
| TCall({eexpr = TConst TSuper},_) ->
|
|
begin try
|
|
begin try
|
|
- let cf = get_super_constructor() in
|
|
|
|
|
|
+ let cf,_ = get_super_constructor() in
|
|
[cf.cf_name_pos]
|
|
[cf.cf_name_pos]
|
|
with Not_found ->
|
|
with Not_found ->
|
|
[]
|
|
[]
|