We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc2b03d commit 9575b29Copy full SHA for 9575b29
src/typing/typer.ml
@@ -357,6 +357,15 @@ let rec type_ident_raise ctx i p mode =
357
let e = type_type ctx ctx.curclass.cl_path p in
358
(* check_locals_masking already done in type_type *)
359
field_access ctx mode f (FStatic (ctx.curclass,f)) (field_type ctx ctx.curclass [] f p) e p
360
+ with Not_found -> try
361
+ (* module-level statics *)
362
+ (match ctx.m.curmod.m_statics with
363
+ | None -> raise Not_found
364
+ | Some c ->
365
+ let f = PMap.find i c.cl_statics in
366
+ let e = type_module_type ctx (TClassDecl c) None p in
367
+ field_access ctx mode f (FStatic (c,f)) (field_type ctx c [] f p) e p
368
+ )
369
with Not_found -> try
370
let wrap e = if mode = MSet then
371
AKNo i
0 commit comments