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

[display] handle "Example.target.hx" files without corresponding "Example.hx" file
fixes #6435

Aleksandr Kuzmenko 5 жил өмнө
parent
commit
39c081a610

+ 2 - 0
extra/CHANGES.txt

@@ -3,8 +3,10 @@
 	Bugfixes:
 
 	all : emit an error on an attempt to modify abstract `this` through a chain of inlined calls in a non-inlined method (#9067)
+	all : fixed completion of target specific hx files without the common hx file (e.g. `Example.js.hx` with non-existent `Example.hx`) (#6435)
 	js : fix startup exception in IE8 related to `Object.defineProperty` (#6918)
 
+
 2019-12-17: 4.0.5
 
 	Bugfixes:

+ 5 - 1
src/compiler/displayOutput.ml

@@ -334,7 +334,11 @@ let process_display_file com classes =
 					| [name] ->
 						classes := path :: !classes;
 						DPKNormal path
-					| _ ->
+					| [name;target] ->
+						let path = fst path, name in
+						classes := path :: !classes;
+						DPKNormal path
+					| e ->
 						assert false
 				in
 				path

+ 3 - 0
tests/misc/projects/Issue6435/Main.js.hx

@@ -0,0 +1,3 @@
+class Main {
+	static function main() {}
+}

+ 3 - 0
tests/misc/projects/Issue6435/compile.hxml

@@ -0,0 +1,3 @@
+-main Main
+-js bin/test.js
+--display Main.js.hx@0@diagnostics