Sfoglia il codice sorgente

[display] skip KAbstractImpl classes for toplevel completion (see #3310)

Dan Korostelev 11 anni fa
parent
commit
ecb177eb74
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      typer.ml

+ 5 - 2
typer.ml

@@ -432,8 +432,11 @@ let collect_toplevel_identifiers ctx =
 	let module_params = ref [] in
 
 	let add_type mt =
-		let path = (t_infos mt).mt_path in
-		if not (List.exists (fun mt2 -> (t_infos mt2).mt_path = path) !module_params) then module_params := mt :: !module_params
+		match mt with
+		| TClassDecl {cl_kind = KAbstractImpl _} -> ()
+		| _ ->
+			let path = (t_infos mt).mt_path in
+			if not (List.exists (fun mt2 -> (t_infos mt2).mt_path = path) !module_params) then module_params := mt :: !module_params
 	in
 
 	(* module types *)