Browse Source

remove DMResolve

Simon Krajewski 3 years ago
parent
commit
a572360baa

+ 0 - 2
src/compiler/displayOutput.ml

@@ -268,8 +268,6 @@ let handle_display_argument com file_pos actx =
 			| _ ->
 				let smode,arg = try ExtString.String.split smode "@" with _ -> pos,"" in
 				match smode with
-					| "resolve" ->
-						create (DMResolve arg)
 					| "workspace-symbols" ->
 						create (DMModuleSymbols (Some arg))
 					| _ ->

+ 1 - 3
src/core/displayTypes.ml

@@ -211,7 +211,6 @@ module DisplayMode = struct
 		| DMDefinition
 		| DMTypeDefinition
 		| DMImplementation
-		| DMResolve of string
 		| DMPackage
 		| DMHover
 		| DMModuleSymbols of string option
@@ -269,7 +268,7 @@ module DisplayMode = struct
 		let settings = { default_display_settings with dms_kind = dm } in
 		match dm with
 		| DMNone -> default_compilation_settings
-		| DMDefault | DMDefinition | DMTypeDefinition | DMResolve _ | DMPackage | DMHover | DMSignature -> settings
+		| DMDefault | DMDefinition | DMTypeDefinition | DMPackage | DMHover | DMSignature -> settings
 		| DMUsage _ | DMImplementation -> { settings with
 				dms_full_typing = true;
 				dms_force_macro_typing = true;
@@ -289,7 +288,6 @@ module DisplayMode = struct
 		| DMDefinition -> "position"
 		| DMTypeDefinition -> "type-definition"
 		| DMImplementation -> "implementation"
-		| DMResolve s -> "resolve " ^ s
 		| DMPackage -> "package"
 		| DMHover -> "type"
 		| DMUsage (true,_,_) -> "rename"

+ 0 - 6
src/typing/typeloadModule.ml

@@ -904,12 +904,6 @@ let type_module ctx mpath file ?(dont_check_path=false) ?(is_extern=false) tdecl
 	let tdecls = handle_import_hx ctx m tdecls p in
 	let ctx = type_types_into_module ctx m tdecls p in
 	if is_extern then m.m_extra.m_kind <- MExtern else if not dont_check_path then Typecore.check_module_path ctx m.m_path p;
-	begin if ctx.is_display_file then match ctx.com.display.dms_kind with
-		| DMResolve s ->
-			DisplayPath.resolve_position_by_path ctx (mk_type_path ([],s)) p
-		| _ ->
-			()
-	end;
 	m
 
 (* let type_module ctx mpath file ?(is_extern=false) tdecls p =

+ 1 - 1
src/typing/typerDisplay.ml

@@ -352,7 +352,7 @@ and display_expr ctx e_ast e dk mode with_type p =
 		| _ -> e
 	in
 	match ctx.com.display.dms_kind with
-	| DMResolve _ | DMPackage ->
+	| DMPackage ->
 		die "" __LOC__
 	| DMSignature ->
 		handle_signature_display ctx e_ast with_type

+ 0 - 1
tests/misc/projects/Issue2996/A.hx

@@ -1 +0,0 @@
-abstract A(String) {}

+ 0 - 5
tests/misc/projects/Issue2996/Main.hx

@@ -1,5 +0,0 @@
-import pack.B;
-
-class Main {
-
-}

+ 0 - 1
tests/misc/projects/Issue2996/compile1.hxml

@@ -1 +0,0 @@
---display Main.hx@0@resolve@A

+ 0 - 3
tests/misc/projects/Issue2996/compile1.hxml.stderr

@@ -1,3 +0,0 @@
-<list>
-<pos>$$normPath(::cwd::/A.hx):1: characters 1-22</pos>
-</list>

+ 0 - 1
tests/misc/projects/Issue2996/compile2.hxml

@@ -1 +0,0 @@
---display Main.hx@0@resolve@C

+ 0 - 3
tests/misc/projects/Issue2996/compile2.hxml.stderr

@@ -1,3 +0,0 @@
-<list>
-<pos>$$normPath(::cwd::/pack/B.hx):3: characters 1-11</pos>
-</list>

+ 0 - 3
tests/misc/projects/Issue2996/pack/B.hx

@@ -1,3 +0,0 @@
-package pack;
-
-class C {}