Skip to content

Commit

Permalink
Revert "allow @:using with Class and Enum (HaxeFoundation#11553)"
Browse files Browse the repository at this point in the history
This reverts commit a78c614.
  • Loading branch information
kLabz committed Feb 18, 2024
1 parent ffe5711 commit 8958828
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 123 deletions.
29 changes: 5 additions & 24 deletions src/context/display/displayFields.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,12 @@ let collect_static_extensions ctx items e p =
| _ ->
let items = loop items ctx.m.module_using in
let items = loop items ctx.g.global_using in
let rec loop_module_using items t = match follow_without_type t with
| TInst(c,_) ->
loop items c.cl_using
| TEnum(en,_) ->
loop items en.e_using
| TType(td,tl) ->
let items = loop items td.t_using in
loop_module_using items (apply_typedef td tl)
| TAbstract(a,_) ->
loop items a.a_using
| TAnon an ->
begin match !(an.a_status) with
| Statics c ->
loop items c.cl_using
| EnumStatics en ->
loop items en.e_using
| AbstractStatics a ->
loop items a.a_using
| _ ->
items
end
| _ ->
items
let items = try
let mt = module_type_of_type e.etype in
loop items (t_infos mt).mt_using
with Exit ->
items
in
let items = loop_module_using items e.etype in
items

let collect ctx e_ast e dk with_type p =
Expand Down
7 changes: 0 additions & 7 deletions src/core/tFunctions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -663,13 +663,6 @@ let rec module_type_of_type = function
(match r.tm_type with
| Some t -> module_type_of_type t
| _ -> raise Exit)
| TAnon an ->
begin match !(an.a_status) with
| Statics c -> TClassDecl c
| EnumStatics en -> TEnumDecl en
| AbstractStatics a -> TAbstractDecl a
| _ -> raise Exit
end
| _ ->
raise Exit

Expand Down
57 changes: 0 additions & 57 deletions tests/display/src/cases/Issue10106.hx

This file was deleted.

35 changes: 0 additions & 35 deletions tests/unit/src/unit/issues/Issue10106.hx

This file was deleted.

0 comments on commit 8958828

Please sign in to comment.