Przeglądaj źródła

fix find references on static fields (see #9440)

Aleksandr Kuzmenko 5 lat temu
rodzic
commit
8b797a5ad7
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 0
      extra/CHANGES.txt
  2. 1 1
      src/context/display/findReferences.ml

+ 1 - 0
extra/CHANGES.txt

@@ -3,6 +3,7 @@
 	Bugfixes:
 
 	all : fixed arguments ordering for @:structInit constructors (#9418)
+	all : fixed display/references completion server request for static fields (#9440)
 	js/cpp : fixed catch var naming collision (#9413)
 	interp : fixed throwing `haxe.macro.Error` outside of a macro context (#9390)
 

+ 1 - 1
src/context/display/findReferences.ml

@@ -33,7 +33,7 @@ let find_references tctx com with_definition name pos kind =
 let collect_reference_positions com =
 	let name,pos,kind = Display.ReferencePosition.get () in
 	match kind, com.display.dms_kind with
-	| SKField (cf,Some cl_path), DMUsage (_,find_descendants,find_base) when find_descendants || find_base ->
+	| SKField (cf,Some cl_path), DMUsage (_,find_descendants,find_base) when (find_descendants || find_base) && not (has_class_field_flag cf CfStatic) ->
 		let collect() =
 			let c =
 				let rec loop = function