Преглед на файлове

don't force early evaluation for extensions (close #2563)

Nicolas Cannasse преди 11 години
родител
ревизия
7ed1adb55e
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      typeload.ml

+ 4 - 1
typeload.ml

@@ -2410,7 +2410,10 @@ let rec init_module_type ctx context_init do_init (decl,p) =
 		(*
 			we exceptionnaly allow follow here because we don't care the type we get as long as it's not our own
 		*)
-		if t.t_type == follow tt then error "Recursive typedef is not allowed" p;
+		(match d.d_data with
+		| CTExtend _ -> ()
+		| _ ->
+			if t.t_type == follow tt then error "Recursive typedef is not allowed" p);
 		(match t.t_type with
 		| TMono r ->
 			(match !r with