Browse Source

display invalid case module path (allow for easier macro debugging) + fix Compiler.include importing import.hx

Nicolas Cannasse 6 years ago
parent
commit
ef9f3706ba
2 changed files with 2 additions and 1 deletions
  1. 1 1
      src/context/typecore.ml
  2. 1 0
      std/haxe/macro/Compiler.hx

+ 1 - 1
src/context/typecore.ml

@@ -244,7 +244,7 @@ let check_uppercase_identifier_name ctx name kind p =
 		check_identifier_name ctx name kind p
 
 let check_module_path ctx path p =
-	check_uppercase_identifier_name ctx (snd path) "module" p;
+	check_uppercase_identifier_name ctx (snd path) ("module " ^ s_type_path path) p;
 	let pack = fst path in
 	try
 		List.iter (fun part -> Path.check_package_name part) pack;

+ 1 - 0
std/haxe/macro/Compiler.hx

@@ -252,6 +252,7 @@ class Compiler {
 			found = true;
 			for (file in sys.FileSystem.readDirectory(path)) {
 				if (StringTools.endsWith(file, ".hx") && file.substr(0, file.length - 3).indexOf(".") < 0) {
+					if( file == "import.hx" ) continue;
 					var cl = prefix + file.substr(0, file.length - 3);
 					if (skip(cl))
 						continue;