Explorar o código

[display] add fake local on unknown ident when in nicolas-mode

closes #8751
Simon Krajewski %!s(int64=6) %!d(string=hai) anos
pai
achega
ccfe98b658
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/typing/typer.ml

+ 3 - 0
src/typing/typer.ml

@@ -1198,6 +1198,9 @@ and type_ident ctx i p mode =
 						| _ ->
 							display_error ctx (error_msg err) p;
 							let t = mk_mono() in
+							(* Add a fake local for #8751. *)
+							if !ServerConfig.legacy_completion then
+								ignore(add_local ctx VGenerated i t p);
 							AKExpr (mk (TIdent i) t p)
 				end
 			end