2
0
Эх сурвалжийг харах

fixed issue with server cache when completion requested but no completion point found

Nicolas Cannasse 13 жил өмнө
parent
commit
550cd1f0ed
1 өөрчлөгдсөн 4 нэмэгдсэн , 2 устгасан
  1. 4 2
      main.ml

+ 4 - 2
main.ml

@@ -879,8 +879,6 @@ try
 	add_libs com (!cp_libs);
 	add_libs com (!cp_libs);
 	(try ignore(Common.find_file com "mt/Include.hx"); Common.define com "mt"; with Not_found -> ());
 	(try ignore(Common.find_file com "mt/Include.hx"); Common.define com "mt"; with Not_found -> ());
 	if com.display then begin
 	if com.display then begin
-		xml_out := None;
-		no_output := true;
 		com.warning <- message ctx;
 		com.warning <- message ctx;
 		com.error <- error ctx;
 		com.error <- error ctx;
 		com.main_class <- None;
 		com.main_class <- None;
@@ -960,6 +958,10 @@ try
 		Typer.finalize tctx;
 		Typer.finalize tctx;
 		t();
 		t();
 		if ctx.has_error then raise Abort;
 		if ctx.has_error then raise Abort;
+		if com.display then begin
+			if ctx.has_next then raise Abort;
+			failwith "No completion point was found";
+		end;
 		let t = Common.timer "filters" in
 		let t = Common.timer "filters" in
 		let main, types, modules = Typer.generate tctx in
 		let main, types, modules = Typer.generate tctx in
 		com.main <- main;
 		com.main <- main;