Browse Source

pull some auxiliary changes from hxb branch

Simon Krajewski 1 year ago
parent
commit
a7df996294

+ 2 - 2
src/compiler/serverCompilationContext.ml

@@ -72,7 +72,7 @@ let ensure_macro_setup sctx =
 let cleanup () = match !MacroContext.macro_interp_cache with
 	| Some interp ->
 		(* curapi holds a reference to the typing context which we don't want to persist. Let's unset it so the
-		   context can be collected. *)		
+		   context can be collected. *)
 		interp.curapi <- Obj.magic ""
 	| None ->
-		()
+		()

+ 30 - 62
src/context/common.ml

@@ -20,6 +20,7 @@ open Extlib_leftovers
 open Ast
 open Type
 open Globals
+open Lookup
 open Define
 open NativeLibraries
 open Warning
@@ -293,76 +294,43 @@ type report_mode =
 	| RMDiagnostics of (Path.UniqueKey.t list)
 	| RMStatistics
 
-class virtual ['key,'value] lookup = object(self)
-	method virtual add : 'key -> 'value -> unit
-	method virtual remove : 'key -> unit
-	method virtual find : 'key -> 'value
-	method virtual iter : ('key -> 'value -> unit) -> unit
-	method virtual fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc
-	method virtual mem : 'key -> bool
-	method virtual clear : unit
-end
-
-class ['key,'value] pmap_lookup = object(self)
-	inherit ['key,'value] lookup
-	val mutable lut : ('key,'value) PMap.t = PMap.empty
-
-	method add (key : 'key) (value : 'value) =
-		lut <- PMap.add key value lut
-
-	method remove (key : 'key) =
-		lut <- PMap.remove key lut
-
-	method find (key : 'key) : 'value =
-		PMap.find key lut
-
-	method iter (f : 'key -> 'value -> unit) =
-		PMap.iter f lut
-
-	method fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc = fun f acc ->
-		PMap.foldi f lut acc
-
-	method mem (key : 'key) =
-		PMap.mem key lut
-
-	method clear =
-		lut <- PMap.empty
-end
-
-class ['key,'value] hashtbl_lookup = object(self)
-	inherit ['key,'value] lookup
-	val lut : ('key,'value) Hashtbl.t = Hashtbl.create 0
-
-	method add (key : 'key) (value : 'value) =
-		Hashtbl.replace lut key value
-
-	method remove (key : 'key) =
-		Hashtbl.remove lut key
-
-	method find (key : 'key) : 'value =
-		Hashtbl.find lut key
-
-	method iter (f : 'key -> 'value -> unit) =
-		Hashtbl.iter f lut
-
-	method fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc = fun f acc ->
-		Hashtbl.fold f lut acc
-
-	method mem (key : 'key) =
-		Hashtbl.mem lut key
-
-	method clear =
-		Hashtbl.clear lut
-end
-
 class module_lut = object(self)
 	inherit [path,module_def] hashtbl_lookup as super
 
 	val type_lut : (path,path) lookup = new hashtbl_lookup
 
+	method add_module_type (m : module_def) (mt : module_type) =
+		let t = t_infos mt in
+		try
+			let path2 = type_lut#find t.mt_path in
+			let p = t.mt_pos in
+			if m.m_path <> path2 && String.lowercase_ascii (s_type_path path2) = String.lowercase_ascii (s_type_path m.m_path) then Error.raise_typing_error ("Module " ^ s_type_path path2 ^ " is loaded with a different case than " ^ s_type_path m.m_path) p;
+			let m2 = self#find path2 in
+			let hex1 = Digest.to_hex m.m_extra.m_sign in
+			let hex2 = Digest.to_hex m2.m_extra.m_sign in
+			let s = if hex1 = hex2 then hex1 else Printf.sprintf "was %s, is %s" hex2 hex1 in
+			Error.raise_typing_error (Printf.sprintf "Type name %s is redefined from module %s (%s)" (s_type_path t.mt_path)  (s_type_path path2) s) p
+		with Not_found ->
+			type_lut#add t.mt_path m.m_path
+
+	method add (path : path) (m : module_def) =
+		super#add path m;
+		List.iter (fun mt -> self#add_module_type m mt) m.m_types
+
+	method remove (path : path) =
+		try
+			List.iter (fun mt -> type_lut#remove (t_path mt)) (self#find path).m_types;
+			super#remove path;
+		with Not_found ->
+			()
+
 	method find_by_type (path : path) =
 		self#find (type_lut#find path)
 
+	method clear =
+		super#clear;
+		type_lut#clear
+
 	method get_type_lut = type_lut
 end
 

+ 11 - 0
src/context/feature.ml

@@ -0,0 +1,11 @@
+open Ast
+open Type
+open Error
+
+let rec check_if_feature = function
+	| [] -> []
+	| (Meta.IfFeature,el,_) :: _ -> List.map (fun (e,p) -> match e with EConst (String(s,_)) -> s | _ -> raise_typing_error "String expected" p) el
+	| _ :: l -> check_if_feature l
+
+let set_feature m cf_ref s =
+	m.m_extra.m_if_feature <- (s, cf_ref) :: m.m_extra.m_if_feature

+ 113 - 0
src/context/lookup.ml

@@ -0,0 +1,113 @@
+
+class virtual ['key,'value] lookup = object(self)
+	method virtual add : 'key -> 'value -> unit
+	method virtual remove : 'key -> unit
+	method virtual find : 'key -> 'value
+	method virtual iter : ('key -> 'value -> unit) -> unit
+	method virtual fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc
+	method virtual mem : 'key -> bool
+	method virtual clear : unit
+
+	method virtual start_group : int
+	method virtual commit_group : int -> int
+	method virtual discard_group : int -> int
+end
+
+class ['key,'value] pmap_lookup = object(self)
+	inherit ['key,'value] lookup
+	val mutable lut : ('key,'value) PMap.t = PMap.empty
+
+	val mutable group_id : int ref = ref 0
+	val mutable groups : (int,'key list) PMap.t = PMap.empty
+
+	method add (key : 'key) (value : 'value) =
+		groups <- PMap.map (fun modules -> key :: modules) groups;
+		lut <- PMap.add key value lut
+
+	method remove (key : 'key) =
+		lut <- PMap.remove key lut
+
+	method find (key : 'key) : 'value =
+		PMap.find key lut
+
+	method iter (f : 'key -> 'value -> unit) =
+		PMap.iter f lut
+
+	method fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc = fun f acc ->
+		PMap.foldi f lut acc
+
+	method mem (key : 'key) =
+		PMap.mem key lut
+
+	method clear =
+		lut <- PMap.empty
+
+	method start_group =
+		incr group_id;
+		let i = !group_id in
+		groups <- PMap.add i [] groups;
+		i
+
+	method commit_group i =
+		let group = PMap.find i groups in
+		let n = List.length group in
+		groups <- PMap.remove i groups;
+		n
+
+	method discard_group i =
+		let group = PMap.find i groups in
+		let n = List.length group in
+		List.iter (fun mpath -> self#remove mpath) group;
+		groups <- PMap.remove i groups;
+		n
+end
+
+class ['key,'value] hashtbl_lookup = object(self)
+	inherit ['key,'value] lookup
+	val lut : ('key,'value) Hashtbl.t = Hashtbl.create 0
+
+	val mutable group_id : int ref = ref 0
+	val mutable groups : (int,'key list) Hashtbl.t = Hashtbl.create 0
+
+	method add (key : 'key) (value : 'value) =
+		Hashtbl.iter (fun i modules -> Hashtbl.replace groups i (key :: modules)) groups;
+		Hashtbl.replace lut key value
+
+	method remove (key : 'key) =
+		Hashtbl.remove lut key
+
+	method find (key : 'key) : 'value =
+		Hashtbl.find lut key
+
+	method iter (f : 'key -> 'value -> unit) =
+		Hashtbl.iter f lut
+
+	method fold : 'acc . ('key -> 'value -> 'acc -> 'acc) -> 'acc -> 'acc = fun f acc ->
+		Hashtbl.fold f lut acc
+
+	method mem (key : 'key) =
+		Hashtbl.mem lut key
+
+	method clear =
+		Hashtbl.clear lut
+
+	method start_group =
+		incr group_id;
+		let i = !group_id in
+		Hashtbl.replace groups i [];
+		i
+
+	method commit_group i =
+		let group = Hashtbl.find groups i in
+		let n = List.length group in
+		Hashtbl.remove groups i;
+		n
+
+	method discard_group i =
+		let group = Hashtbl.find groups i in
+		let n = List.length group in
+		List.iter (fun mpath -> self#remove mpath) group;
+		Hashtbl.remove groups i;
+		n
+end
+

+ 1 - 0
src/context/typecore.ml

@@ -20,6 +20,7 @@
 open Globals
 open Ast
 open Common
+open Lookup
 open Type
 open Error
 open Resolution

+ 1 - 1
src/core/displayTypes.ml

@@ -352,4 +352,4 @@ type display_exception_kind =
 	| DisplayPositions of pos list
 	| DisplayFields of fields_result
 	| DisplayPackage of string list
-	| DisplayNoResult
+	| DisplayNoResult

+ 1 - 3
src/core/naming.ml

@@ -1,8 +1,6 @@
 open Globals
 open Ast
-open Meta
 open Type
-open Error
 
 (** retrieve string from @:native metadata or raise Not_found *)
 let get_native_name meta =
@@ -85,4 +83,4 @@ let apply_native_paths t =
 		| _ ->
 			())
 	with Not_found ->
-		()		
+		()

+ 59 - 6
src/core/tFunctions.ml

@@ -199,19 +199,53 @@ let mk_field name ?(public = true) ?(static = false) t p name_pos = {
 }
 
 let null_module = {
-		m_id = alloc_mid();
-		m_path = [] , "";
-		m_types = [];
-		m_statics = None;
-		m_extra = module_extra "" "" 0. MFake [];
-	}
+	m_id = alloc_mid();
+	m_path = [] , "";
+	m_types = [];
+	m_statics = None;
+	m_extra = module_extra "" "" 0. MFake [];
+}
 
 let null_class =
 	let c = mk_class null_module ([],"") null_pos null_pos in
 	c.cl_private <- true;
 	c
 
+let null_typedef =
+	let t = mk_typedef null_module ([],"") null_pos null_pos (TDynamic None) in
+	t.t_private <- true;
+	t
+
+let null_tanon = { a_fields = PMap.empty; a_status = ref Closed }
+
+let null_enum = {
+	e_path = ([],"");
+	e_module = null_module;
+	e_pos = null_pos;
+	e_name_pos = null_pos;
+	e_private = true;
+	e_doc = None;
+	e_meta = [];
+	e_params = [];
+	e_using = [];
+	e_restore = (fun () -> ());
+	e_type = t_dynamic;
+	e_extern = false;
+	e_constrs = PMap.empty;
+	e_names = [];
+}
+
 let null_field = mk_field "" t_dynamic null_pos null_pos
+let null_enum_field = {
+	ef_name = "";
+	ef_type = TEnum (null_enum, []);
+	ef_pos = null_pos;
+	ef_name_pos = null_pos;
+	ef_doc = None;
+	ef_index = 0;
+	ef_params = [];
+	ef_meta = [];
+}
 
 let null_abstract = {
 	a_path = ([],"");
@@ -518,6 +552,15 @@ let rec follow t =
 		follow t
 	| _ -> t
 
+let rec follow_lazy t =
+	match t with
+	| TLazy f ->
+		(match !f with
+		| LAvailable t -> follow_lazy t
+		| _ -> follow_lazy (lazy_type f)
+		)
+	| _ -> t
+
 let follow_once t =
 	match t with
 	| TMono r ->
@@ -893,3 +936,13 @@ let abstract_module_type a tl =
 	let path = ([],Printf.sprintf "Abstract<%s>" (s_type_path a.a_path)) in
 	let t = mk_anon (ref (AbstractStatics a)) in
 	{(mk_typedef a.a_module path a.a_pos null_pos t) with t_private = true}
+
+let class_field_of_enum_field ef = {
+	(mk_field ef.ef_name ef.ef_type ef.ef_pos ef.ef_name_pos) with
+	cf_kind = (match follow ef.ef_type with
+		| TFun _ -> Method MethNormal
+		| _ -> Var { v_read = AccNormal; v_write = AccNo }
+	);
+	cf_doc = ef.ef_doc;
+	cf_params = ef.ef_params;
+}

+ 46 - 2
src/core/tOther.ml

@@ -2,7 +2,6 @@ open Globals
 open Ast
 open TType
 open TFunctions
-open TPrinting
 
 module TExprToExpr = struct
 	let tpath path module_path params =
@@ -263,6 +262,51 @@ end
 
 let no_meta = []
 
+let mk_enum m path pos name_pos =
+	{
+		e_path = path;
+		e_module = m;
+		e_pos = pos;
+		e_name_pos = name_pos;
+		e_doc = None;
+		e_meta = [];
+		e_params = [];
+		e_using = [];
+		e_restore = (fun () -> ());
+		e_private = false;
+		e_extern = false;
+		e_constrs = PMap.empty;
+		e_names = [];
+		e_type = mk_mono();
+	}
+
+let mk_abstract m path pos name_pos =
+	{
+		a_path = path;
+		a_private = false;
+		a_module = m;
+		a_pos = pos;
+		a_name_pos = name_pos;
+		a_doc = None;
+		a_params = [];
+		a_using = [];
+		a_restore = (fun () -> ());
+		a_meta = [];
+		a_from = [];
+		a_to = [];
+		a_from_field = [];
+		a_to_field = [];
+		a_ops = [];
+		a_unops = [];
+		a_impl = None;
+		a_array = [];
+		a_this = mk_mono();
+		a_read = None;
+		a_write = None;
+		a_enum = false;
+		a_call = None;
+	}
+
 let mk_enum m path pos name_pos =
 	{
 		e_path = path;
@@ -375,4 +419,4 @@ let s_class_path c =
 		| KAbstractImpl a -> a.a_path
 		| _ -> c.cl_path
 	in
-	s_type_path path
+	s_type_path path

+ 1 - 1
src/core/tPrinting.ml

@@ -441,7 +441,7 @@ module Printer = struct
 	let s_metadata metadata =
 		s_list " " s_metadata_entry metadata
 
-	let s_type_param ttp = 
+	let s_type_param ttp =
 		let s = match (get_constraints ttp) with
 			| [] -> ttp.ttp_name
 			| tl1 -> Printf.sprintf "%s:%s" ttp.ttp_name (String.concat " & " (List.map s_type tl1))

+ 11 - 11
src/core/tType.ml

@@ -92,10 +92,10 @@ and tparams = t list
 
 and typed_type_param = {
 	ttp_name : string;
-	ttp_type : t;
 	ttp_class : tclass;
+	mutable ttp_type : t;
 	mutable ttp_constraints : t list Lazy.t option;
-	ttp_default : t option;
+	mutable ttp_default : t option;
 }
 
 and type_params = typed_type_param list
@@ -250,10 +250,10 @@ and tinfos = {
 	mt_module : module_def;
 	mt_pos : pos;
 	mt_name_pos : pos;
-	mt_private : bool;
-	mt_doc : Ast.documentation;
+	mutable mt_private : bool;
+	mutable mt_doc : Ast.documentation;
 	mutable mt_meta : metadata;
-	mt_params : type_params;
+	mutable mt_params : type_params;
 	mutable mt_using : (tclass * pos) list;
 	mutable mt_restore : unit -> unit;
 }
@@ -307,14 +307,14 @@ and tenum = {
 	e_module : module_def;
 	e_pos : pos;
 	e_name_pos : pos;
-	e_private : bool;
+	mutable e_private : bool;
 	mutable e_doc : Ast.documentation;
 	mutable e_meta : metadata;
 	mutable e_params : type_params;
 	mutable e_using : (tclass * pos) list;
 	mutable e_restore : unit -> unit;
 	(* do not insert any fields above *)
-	e_type : t;
+	mutable e_type : t;
 	mutable e_extern : bool;
 	mutable e_constrs : (string , tenum_field) PMap.t;
 	mutable e_names : string list;
@@ -325,8 +325,8 @@ and tdef = {
 	t_module : module_def;
 	t_pos : pos;
 	t_name_pos : pos;
-	t_private : bool;
-	t_doc : Ast.documentation;
+	mutable t_private : bool;
+	mutable t_doc : Ast.documentation;
 	mutable t_meta : metadata;
 	mutable t_params : type_params;
 	mutable t_using : (tclass * pos) list;
@@ -340,7 +340,7 @@ and tabstract = {
 	a_module : module_def;
 	a_pos : pos;
 	a_name_pos : pos;
-	a_private : bool;
+	mutable a_private : bool;
 	mutable a_doc : Ast.documentation;
 	mutable a_meta : metadata;
 	mutable a_params : type_params;
@@ -359,7 +359,7 @@ and tabstract = {
 	mutable a_read : tclass_field option;
 	mutable a_write : tclass_field option;
 	mutable a_call : tclass_field option;
-	a_enum : bool;
+	mutable a_enum : bool;
 }
 
 and module_type =

+ 1 - 2
src/filters/localStatic.ml

@@ -1,4 +1,3 @@
-open Global
 open Common
 open Type
 open Typecore
@@ -60,4 +59,4 @@ let run ctx e =
 		| _ ->
 			Type.map_expr run e
 	in
-	run e
+	run e

+ 1 - 0
src/typing/finalization.ml

@@ -1,5 +1,6 @@
 open Globals
 open Common
+open Lookup
 open Type
 open Error
 open TyperBase

+ 1 - 1
src/typing/matcher/exprToPattern.ml

@@ -446,4 +446,4 @@ let rec make pctx toplevel t e =
 			fail()
 	in
 	let pat = loop e in
-	pat,p
+	pat,p

+ 1 - 1
src/typing/typeload.ml

@@ -895,4 +895,4 @@ let init_core_api ctx c =
 	| Some cf, _ when not (has_class_field_flag cf CfPublic) -> ()
 	| Some f, Some f2 -> compare_fields f f2
 	| None, Some cf when not (has_class_field_flag cf CfPublic) -> ()
-	| _ -> raise_typing_error "Constructor differs from core type" c.cl_pos)
+	| _ -> raise_typing_error "Constructor differs from core type" c.cl_pos)

+ 0 - 14
src/typing/typeloadCheck.ml

@@ -334,20 +334,6 @@ let check_global_metadata ctx meta f_add mpath tpath so =
 	) ctx.com.global_metadata;
 	if ctx.is_display_file then delay ctx PCheckConstraint (fun () -> DisplayEmitter.check_display_metadata ctx meta)
 
-let check_module_types ctx m p t =
-	let t = t_infos t in
-	try
-		let path2 = ctx.com.module_lut#get_type_lut#find t.mt_path in
-		if m.m_path <> path2 && String.lowercase_ascii (s_type_path path2) = String.lowercase_ascii (s_type_path m.m_path) then raise_typing_error ("Module " ^ s_type_path path2 ^ " is loaded with a different case than " ^ s_type_path m.m_path) p;
-		let m2 = ctx.com.module_lut#find path2 in
-		let hex1 = Digest.to_hex m.m_extra.m_sign in
-		let hex2 = Digest.to_hex m2.m_extra.m_sign in
-		let s = if hex1 = hex2 then hex1 else Printf.sprintf "was %s, is %s" hex2 hex1 in
-		raise_typing_error (Printf.sprintf "Type name %s is redefined from module %s (%s)" (s_type_path t.mt_path)  (s_type_path path2) s) p
-	with
-		Not_found ->
-			ctx.com.module_lut#get_type_lut#add t.mt_path m.m_path
-
 module Inheritance = struct
 	let is_basic_class_path path = match path with
 		| ([],("Array" | "String" | "Date" | "Xml")) -> true

+ 6 - 10
src/typing/typeloadFields.ml

@@ -957,7 +957,7 @@ module TypeBinding = struct
 							| NothingToDo ->
 								(fun () -> ())
 							| NormalOverride rctx ->
-								(fun () -> 
+								(fun () ->
 									TypeloadCheck.check_override_field ctx cf.cf_name_pos rctx
 								)
 							| OverloadOverride f ->
@@ -965,7 +965,7 @@ module TypeBinding = struct
 							end
 						| _ ->
 							(fun () -> ())
-					in					
+					in
 					let e = TypeloadFunction.type_function ctx args ret fmode e fctx.is_display_field p in
 					f_check();
 					(* Disabled for now, see https://github.com/HaxeFoundation/haxe/issues/3033 *)
@@ -1782,12 +1782,7 @@ let init_class ctx c p herits fields =
 		| _ :: l ->
 			check_require l
 	in
-	let rec check_if_feature = function
-		| [] -> []
-		| (Meta.IfFeature,el,_) :: _ -> List.map (fun (e,p) -> match e with EConst (String(s,_)) -> s | _ -> raise_typing_error "String expected" p) el
-		| _ :: l -> check_if_feature l
-	in
-	let cl_if_feature = check_if_feature c.cl_meta in
+	let cl_if_feature = Feature.check_if_feature c.cl_meta in
 	let cl_req = check_require c.cl_meta in
 	let has_init = ref false in
 	List.iter (fun f ->
@@ -1812,10 +1807,11 @@ let init_class ctx c p herits fields =
 					| FKConstructor -> CfrConstructor
 					| _ -> if fctx.is_static then CfrStatic else CfrMember
 				in
-				ctx.m.curmod.m_extra.m_if_feature <- (s, (mk_class_field_ref c cf ref_kind fctx.is_macro)) :: ctx.m.curmod.m_extra.m_if_feature;
+				let cf_ref = mk_class_field_ref c cf ref_kind fctx.is_macro in
+				Feature.set_feature ctx.m.curmod cf_ref s;
 			in
 			List.iter set_feature cl_if_feature;
-			List.iter set_feature (check_if_feature cf.cf_meta);
+			List.iter set_feature (Feature.check_if_feature cf.cf_meta);
 			let req = check_require f.cff_meta in
 			let req = (match req with None -> if fctx.is_static || fctx.field_kind = FKConstructor then cl_req else None | _ -> req) in
 			(match req with

+ 5 - 11
src/typing/typeloadModule.ml

@@ -55,7 +55,6 @@ module ModuleLevel = struct
 		m
 
 	let add_module ctx m p =
-		List.iter (TypeloadCheck.check_module_types ctx m p) m.m_types;
 		ctx.com.module_lut#add m.m_path m
 
 	(*
@@ -380,15 +379,7 @@ module TypeLevel = struct
 			ef_meta = c.ec_meta;
 		} in
 		DeprecationCheck.check_is ctx.com e.e_meta f.ef_meta f.ef_name f.ef_meta f.ef_name_pos;
-		let cf = {
-			(mk_field f.ef_name f.ef_type p f.ef_name_pos) with
-			cf_kind = (match follow f.ef_type with
-				| TFun _ -> Method MethNormal
-				| _ -> Var { v_read = AccNormal; v_write = AccNo }
-			);
-			cf_doc = f.ef_doc;
-			cf_params = f.ef_params;
-		} in
+		let cf = class_field_of_enum_field f in
 		if ctx.is_display_file && DisplayPosition.display_position#enclosed_in f.ef_name_pos then
 			DisplayEmitter.display_enum_field ctx e f p;
 		f,cf
@@ -751,7 +742,10 @@ let type_types_into_module ctx m tdecls p =
 	let ctx = create_typer_context_for_module ctx m in
 	let decls,tdecls = ModuleLevel.create_module_types ctx m tdecls p in
 	let types = List.map fst decls in
-	List.iter (TypeloadCheck.check_module_types ctx m p) types;
+	(* During the initial module_lut#add in type_module, m has no m_types yet by design.
+	   We manually add them here. This and module_lut#add itself should be the only places
+	   in the compiler that call add_module_type. *)
+	List.iter (fun mt -> ctx.com.module_lut#add_module_type m mt) types;
 	m.m_types <- m.m_types @ types;
 	(* define the per-module context for the next pass *)
 	if ctx.g.std_types != null_module then begin

+ 1 - 1
src/typing/typer.ml

@@ -1859,7 +1859,7 @@ and type_expr ?(mode=MGet) ctx (e,p) (with_type:WithType.t) =
 		else match e2.etype with
 			| TAbstract({a_path = [],"Null"},[t]) -> tmin
 			| _ -> follow_null tmin
-		in		
+		in
 		let e1 = vr#as_var "tmp" {e1 with etype = ctx.t.tnull tmin} in
 		let e_null = Builder.make_null e1.etype e1.epos in
 		let e_cond = mk (TBinop(OpNotEq,e1,e_null)) ctx.t.tbool e1.epos in

+ 3 - 3
src/typing/typerEntry.ml

@@ -25,7 +25,7 @@ let create com macros =
 			complete = false;
 			type_hints = [];
 			load_only_cached_modules = false;
-			functional_interface_lut = new pmap_lookup;
+			functional_interface_lut = new Lookup.pmap_lookup;
 			do_macro = MacroContext.type_macro;
 			do_load_macro = MacroContext.load_macro';
 			do_load_module = TypeloadModule.load_module;
@@ -124,7 +124,7 @@ let create com macros =
 	List.iter (fun mt -> match mt with
 		| TClassDecl c -> ctx.g.std <- c;
 		| _ -> ()
-	) m.m_types;	
+	) m.m_types;
 	let m = TypeloadModule.load_module ctx ([],"Array") null_pos in
 	(try
 		List.iter (fun t -> (
@@ -151,4 +151,4 @@ let create com macros =
 
 ;;
 create_context_ref := create;
-Inline.maybe_reapply_overload_call_ref := CallUnification.maybe_reapply_overload_call;
+Inline.maybe_reapply_overload_call_ref := CallUnification.maybe_reapply_overload_call;

+ 1 - 1
tests/server/src/Main.hx

@@ -13,4 +13,4 @@ class Main {
 		report.displaySuccessResults = NeverShowSuccessResults;
 		runner.run();
 	}
-}
+}

+ 1 - 1
tests/server/src/cases/issues/Issue9690.hx

@@ -15,4 +15,4 @@ class Issue9690 extends TestCase {
 		Assert.isTrue(lastResult.hasError);
 		Assert.isTrue(lastResult.stderr.contains('Error: side effect!'));
 	}
-}
+}