Skip to content

Commit

Permalink
[display] use ClassStatics fields properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jan 23, 2024
1 parent c3c206f commit e5983c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/context/display/displayFields.ml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ let collect ctx e_ast e dk with_type p =
| _ -> items
in
(* Anon own fields *)
let fields = match !(an.a_status) with
| ClassStatics c -> c.cl_statics
| _ -> an.a_fields
in
PMap.foldi (fun name cf acc ->
if is_new_item acc name then begin
let allow_static_abstract_access c cf =
Expand Down Expand Up @@ -293,7 +297,7 @@ let collect ctx e_ast e dk with_type p =
add origin make_ci_class_field;
end else
acc
) an.a_fields items
) fields items
| TFun (args,ret) ->
(* A function has no field except the magic .bind one. *)
if is_new_item items "bind" then begin
Expand Down

0 comments on commit e5983c2

Please sign in to comment.