Skip to content

Commit bba4cae

Browse files
committed
Resolve constant types through to their definitions.
1 parent 46e46d0 commit bba4cae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/boot/me/type.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
295295
LTYPE_mono ty
296296
else
297297
LTYPE_poly ((Array.map (fun p -> p.Common.node) params), ty)
298-
| Ast.MOD_ITEM_const (ty, _) -> LTYPE_mono ty
298+
| Ast.MOD_ITEM_const _ ->
299+
let ty = Hashtbl.find cx.Semant.ctxt_all_item_types mid_id in
300+
LTYPE_mono ty
299301
| Ast.MOD_ITEM_type _ ->
300302
Common.err None "Type-item used in non-type context"
301303
in

0 commit comments

Comments
 (0)