|
@@ -2571,6 +2571,7 @@ let type_module ctx m tdecls loadp =
|
|
let t = get_tdef d.d_name in
|
|
let t = get_tdef d.d_name in
|
|
ctx.type_params <- t.t_types;
|
|
ctx.type_params <- t.t_types;
|
|
let tt = load_type ctx p d.d_data in
|
|
let tt = load_type ctx p d.d_data in
|
|
|
|
+ if t.t_type == follow tt then error "Recursive typedef is not allowed" p;
|
|
(match t.t_type with
|
|
(match t.t_type with
|
|
| TMono r ->
|
|
| TMono r ->
|
|
(match !r with
|
|
(match !r with
|