Browse Source

[generic] make sure we link Dynamic too

closes #8102
Simon Krajewski 6 years ago
parent
commit
0b48ead303
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/typing/generic.ml

+ 3 - 1
src/typing/generic.ml

@@ -247,7 +247,9 @@ let rec build_generic ctx c p tl =
 			let r = exc_protect ctx (fun r ->
 				let t = mk_mono() in
 				r := lazy_processing (fun() -> t);
-				unify_raise ctx (f()) t p;
+				let t0 = f() in
+				unify_raise ctx t0 t p;
+				link_dynamic t0 t;
 				t
 			) "build_generic" in
 			cf_new.cf_type <- TLazy r;